class CommonsMathWrapper {

  public static RealMatrix wrapAsMatrix(final DoubleMatrix1D x) {
    Validate.notNull(x);
    final int n = x.getNumberOfElements();
    final double[][] y = new double[n][1];
    for (int i = 0; i < n; i++) {
      y[i][0] = x.getEntry(i);
    }
    return new Array2DRowRealMatrix(x.getData());
  }

  private  CommonsMathWrapper();

}