public SparseMatrixRow(ValueConf vconf, int rowIndex, int colIds[], float colVals[]) { this.vconf = vconf; short packed[] = new short[colVals.length]; for (int i = 0; i < colVals.length; i++) { packed[i] = vconf.pack(colVals[i]); } createBuffer(rowIndex, colIds, packed); }
public SparseMatrixRow(ValueConf vconf, int rowIndex, int colIds[], float colVals[]) { this.vconf = vconf; short packed[] = new short[colVals.length]; for (int i = 0; i < colVals.length; i++) { packed[i] = vconf.pack(colVals[i]); } createBuffer(rowIndex, colIds, packed); }
public DenseMatrixRow(ValueConf vconf, int rowIndex, int colIds[], float colVals[]) { if (!SparseMatrixUtils.isIncreasing(colIds)) { throw new IllegalArgumentException("Columns must be sorted by id"); } this.vconf = vconf; this.c1 = vconf.c1; this.c2 = vconf.c2; this.colIds = colIds; short packed[] = new short[colVals.length]; for (int i = 0; i < colVals.length; i++) { packed[i] = vconf.pack(colVals[i]); } createBuffer(rowIndex, colIds, packed); }
public DenseMatrixRow(ValueConf vconf, int rowIndex, int colIds[], float colVals[]) { if (!SparseMatrixUtils.isIncreasing(colIds)) { throw new IllegalArgumentException("Columns must be sorted by id"); } this.vconf = vconf; this.c1 = vconf.c1; this.c2 = vconf.c2; this.colIds = colIds; short packed[] = new short[colVals.length]; for (int i = 0; i < colVals.length; i++) { packed[i] = vconf.pack(colVals[i]); } createBuffer(rowIndex, colIds, packed); }