123124125126127128129
if (i % nskip == 0) { res[k++] = c; } } return (new PrimitiveIntArray(res)); }
40414243444546
} public DoubleArrayView(IDoubleArray _data, int[] rowIndexes, int[] colIndexes) { this.data = _data; this.map = ArrayIndexMap.createMap(data, new PrimitiveIntArray(rowIndexes), new PrimitiveIntArray(colIndexes)); }
52535455565758
} public DoubleArrayView(IDoubleArray _data, int[] indexes) { this.data = _data; this.map = ArrayIndexMap.createMap(data, new PrimitiveIntArray(indexes)); }
39404142434445
// // *********************************************************************** public IIntArray array(int size) { return (new PrimitiveIntArray(new int[size])); }
44454647484950
return (new PrimitiveIntArray(new int[size])); } public IIntArray array(int size, int value) { return (new PrimitiveIntArray(PrimitiveIntTools.createInitialized(size, value))); }
49505152535455
return (new PrimitiveIntArray(PrimitiveIntTools.createInitialized(size, value))); } public IIntArray array(IIntArray arr) { return (new PrimitiveIntArray(arr.getArray())); }
58596061626364
* Convenience constructor for primitive arrays */ public IIntArray arrayFrom(int d) { int[] arr = PrimitiveIntTools.getIntArray(d); return (new PrimitiveIntArray(arr)); }
68697071727374
* (this one is necessary because it does not overlap with create(double[]) */ public IIntArray arrayFrom(int d1, int... d2) { int[] arr = PrimitiveIntTools.concat(PrimitiveIntTools.getIntArray(d1),d2); return (new PrimitiveIntArray(arr)); }
76777879808182
/** * Convenience constructor for primitive arrays */ public IIntArray arrayFrom(int[] arr) { return (new PrimitiveIntArray(arr)); }
83848586878889
public IIntArray arrayFrom(double[] a) { int[] res = PrimitiveIntTools.from(a); return (new PrimitiveIntArray(res)); }