@Test public void testCrossProduct() { Matrix result = test.cross(test); assertEquals("row size", test.size(), result.rowSize()); assertEquals("col size", test.size(), result.columnSize()); for (int row = 0; row < result.rowSize(); row++) { for (int col = 0; col < result.columnSize(); col++) { assertEquals("cross[" + row + "][" + col + ']', test.getQuick(row) * test.getQuick(col), result.getQuick(row, col), EPSILON); } } }
@Override public double getQuick(int index) { return vector.getQuick(offset + index); }
VectorView extends AbstractVector { @Override public double getQuick(int index) { return vector.getQuick(offset + index); } }
VectorView extends AbstractVector { @Override public double getQuick(int index) { return vector.getQuick(offset + index); } VectorView();  VectorView(Vector vector, int offset, int cardinality); }
VectorView extends AbstractVector { @Override public double getQuick(int index) { return vector.getQuick(offset + index); } VectorView();  VectorView(Vector vector, int offset, int cardinality); @Override Vector clone(); @Override boolean isDense(); @Override boolean isSequentialAccess(); @Override VectorView like(); @Override Vector like(int cardinality); @Override double getQuick(int index); @Override void setQuick(int index, double value); @Override int getNumNondefaultElements(); @Override Vector viewPart(int offset, int length); @Override Iterator<Element> iterateNonZero(); @Override Iterator<Element> iterator(); @Override double getLengthSquared(); @Override double getDistanceSquared(Vector v); @Override double getLookupCost(); @Override double getIteratorAdvanceCost(); @Override boolean isAddConstantTime(); @Override void mergeUpdates(OrderedIntDoubleMapping updates); }
VectorView extends AbstractVector { @Override public double getQuick(int index) { return vector.getQuick(offset + index); } VectorView();  VectorView(Vector vector, int offset, int cardinality); @Override Vector clone(); @Override boolean isDense(); @Override boolean isSequentialAccess(); @Override VectorView like(); @Override Vector like(int cardinality); @Override double getQuick(int index); @Override void setQuick(int index, double value); @Override int getNumNondefaultElements(); @Override Vector viewPart(int offset, int length); @Override Iterator<Element> iterateNonZero(); @Override Iterator<Element> iterator(); @Override double getLengthSquared(); @Override double getDistanceSquared(Vector v); @Override double getLookupCost(); @Override double getIteratorAdvanceCost(); @Override boolean isAddConstantTime(); @Override void mergeUpdates(OrderedIntDoubleMapping updates);  }