Example usage for org.apache.commons.lang NotImplementedException NotImplementedException

List of usage examples for org.apache.commons.lang NotImplementedException NotImplementedException

Introduction

In this page you can find the example usage for org.apache.commons.lang NotImplementedException NotImplementedException.

Prototype

public NotImplementedException() 

Source Link

Document

Constructs a new NotImplementedException with default message.

Usage

From source file:com.opengamma.analytics.math.matrix.MatrixAlgebra.java

/**
 * Adds two matrices. This operation can only be performed if the matrices are of the same type and dimensions.
 * @param m1 The first matrix, not null/*w  w w  . j a v a2  s.  co m*/
 * @param m2 The second matrix, not null
 * @return The sum of the two matrices
 * @throws IllegalArgumentException If the matrices are not of the same type, if the matrices are not the same shape.
 */
public Matrix<?> add(final Matrix<?> m1, final Matrix<?> m2) {
    Validate.notNull(m1, "m1");
    Validate.notNull(m2, "m2");
    if (m1 instanceof DoubleMatrix1D) {
        if (m2 instanceof DoubleMatrix1D) {
            final double[] x1 = ((DoubleMatrix1D) m1).getData();
            final double[] x2 = ((DoubleMatrix1D) m2).getData();
            final int n = x1.length;
            Validate.isTrue(n == x2.length, "Can only add matrices of the same shape");
            final double[] sum = new double[n];
            for (int i = 0; i < n; i++) {
                sum[i] = x1[i] + x2[i];
            }
            return new DoubleMatrix1D(sum);
        }
        throw new IllegalArgumentException("Tried to add a " + m1.getClass() + " and " + m2.getClass());
    } else if (m1 instanceof DoubleMatrix2D) {
        if (m2 instanceof DoubleMatrix2D) {

            final double[][] x1 = ((DoubleMatrix2D) m1).getData();
            final double[][] x2 = ((DoubleMatrix2D) m2).getData();
            final int n = x1.length;
            final int m = x1[0].length;
            Validate.isTrue(n == x2.length, "Can only add matrices of the same shape");
            final double[][] sum = new double[n][x1[0].length];
            for (int i = 0; i < n; i++) {
                Validate.isTrue(m == x2[i].length, "Can only add matrices of the same shape");
                for (int j = 0; j < m; j++) {
                    sum[i][j] = x1[i][j] + x2[i][j];
                }
            }
            return new DoubleMatrix2D(sum);
        }
        throw new IllegalArgumentException("Tried to add a " + m1.getClass() + " and " + m2.getClass());
    }
    throw new NotImplementedException();
}

From source file:com.amalto.core.server.routing.MockItem.java

@Override
public DroppedItemPOJOPK dropItem(ItemPOJOPK itemPOJOPK, String partPath, boolean override)
        throws XtentisException {
    throw new NotImplementedException();
}

From source file:com.github.seleniumpm.SeleniumWebdriver.java

public void start(Object o) {
    throw new NotImplementedException();
}

From source file:com.opengamma.analytics.financial.greeks.AbstractGreekVisitor.java

@Override
public T visitVarianceVega() {
    throw new NotImplementedException();
}

From source file:com.amalto.core.query.user.VisitorAdapter.java

public T visit(Field field) {
    throw new NotImplementedException();
}

From source file:com.bloatit.model.visitor.AbstractModelClassVisitor.java

@Override
public T visit(final Team model) {
    throw new NotImplementedException();
}

From source file:com.swordlord.gozer.components.wicket.action.button.GWAjaxLinkAction.java

@Override
public DataBinding getDataBindingTwo() {
    throw new NotImplementedException();
}

From source file:com.antsdb.saltedfish.storage.HBaseScanResult.java

@Override
public boolean eof() {
    throw new NotImplementedException();
}

From source file:com.github.seleniumpm.SeleniumWebdriver.java

public void stop() {
    throw new NotImplementedException();
}

From source file:com.rapleaf.hank.storage.curly.TestAbstractCurlyPartitionUpdater.java

@Override
public void setUp() throws Exception {
    super.setUp();

    this.updater = new AbstractCurlyPartitionUpdater(domain,
            new LocalPartitionRemoteFileOps(remotePartitionRoot, 0), localPartitionRoot) {
        @Override/* w  w  w.j  a  v  a2s  . co m*/
        protected boolean shouldFetchCurlyVersion(DomainVersion version) throws IOException {
            return true;
        }

        @Override
        protected void runUpdateCore(DomainVersion currentVersion, DomainVersion updatingToVersion,
                IncrementalUpdatePlan updatePlan, String updateWorkRoot) throws IOException {
            throw new NotImplementedException();
        }
    };

    if (!new File(updateWorkRoot).mkdir()) {
        throw new IOException("Failed to create update work root");
    }
}