RowsStore(final MatrixStore<N> aBase, final int... someRows) { super(someRows.length, (int) aBase.countColumns(), aBase); myRows = someRows; myFirst = 0; }
RowsStore(final int aFirst, final int aLimit, final MatrixStore<N> aBase) { super(aLimit - aFirst, (int) aBase.countColumns(), aBase); myRows = null; myFirst = aFirst; }
public ColumnsStore(final int aFirst, final int aLimit, final MatrixStore<N> aBase) { super((int) aBase.countRows(), aLimit - aFirst, aBase); myColumns = null; myFirst = aFirst; }
public ColumnsStore(final MatrixStore<N> aBase, final int... someColumns) { super((int) aBase.countRows(), someColumns.length, aBase); myColumns = someColumns; myFirst = 0; }
@Override protected void setUp() throws Exception { super.setUp(); final int tmpRowDim = Uniform.randomInteger(1, 9); final int tmpColDim = Uniform.randomInteger(1, 9); final BasicMatrix tmpBase = NonPhysicalTest.makeRandomMatrix(tmpRowDim, tmpColDim); final int tmpRowIndex = Uniform.randomInteger(tmpRowDim); final int tmpColumnIndex = Uniform.randomInteger(tmpColDim); final BigDecimal tmpElement = BigMath.PI; final MatrixStore<BigDecimal> aBase = BigDenseStore.FACTORY.copy((Access2D<?>) tmpBase); // myBigStore = new // SuperimposedMatrixStore<BigDecimal>(BigDenseStore.FACTORY.copyMatrix(tmpBase), tmpRowIndex, // tmpColumnIndex, tmpElement); // myComplexStore = new // SuperimposedMatrixStore<ComplexNumber>(ComplexDenseStore.FACTORY.copyMatrix(tmpBase), // tmpRowIndex, tmpColumnIndex, ComplexNumber.makeReal(tmpElement.doubleValue())); // myPrimitiveStore = new // SuperimposedMatrixStore<Double>(PrimitiveDenseStore.FACTORY.copyMatrix(tmpBase), tmpRowIndex, // tmpColumnIndex, tmpElement.doubleValue()); myBigStore = new SuperimposedStore<BigDecimal>( aBase, tmpRowIndex, tmpColumnIndex, new SingleStore<BigDecimal>(aBase.factory(), tmpElement)); final MatrixStore<ComplexNumber> aBase1 = ComplexDenseStore.FACTORY.copy((Access2D<?>) tmpBase); myComplexStore = new SuperimposedStore<ComplexNumber>( aBase1, tmpRowIndex, tmpColumnIndex, new SingleStore<ComplexNumber>( aBase1.factory(), ComplexNumber.valueOf(tmpElement.doubleValue()))); final MatrixStore<Double> aBase2 = PrimitiveDenseStore.FACTORY.copy((Access2D<?>) tmpBase); myPrimitiveStore = new SuperimposedStore<Double>( aBase2, tmpRowIndex, tmpColumnIndex, new SingleStore<Double>(aBase2.factory(), tmpElement.doubleValue())); }