/** * Initializes class data structures and parameters */ void initialize(DMatrixSparseCSC A) { m = A.numRows; n = A.numCols; int s = 4 * n + (ata ? (n + m + 1) : 0); gw.reshape(s); w = gw.data; // compute the transpose of A At.reshape(A.numCols, A.numRows, A.nz_length); CommonOps_DSCC.transpose(A, At, gw); // initialize w //Arrays.fill(w, 0, s, -1); // assign all values in workspace to -1 for (var i = 0; i < s; i++) { w[i] = -1; } ancestor = 0; maxfirst = n; prevleaf = 2 * n; first = 3 * n; }
private void init(int N) { this.N = N; if (parent.Length < N) { parent = new int[N]; post = new int[N]; counts = new int[N]; gw.reshape(3 * N); } }
/** * Initializes data structures */ void init(DMatrixSparseCSC A) { this.A = A; this.m = A.numRows; this.n = A.numCols; this.next = 0; this.head = m; this.tail = m + n; this.nque = m + 2 * n; if (parent.Length < n || leftmost.Length < m) { parent = new int[n]; post = new int[n]; pinv = new int[m + n]; countsR = new int[n]; leftmost = new int[m]; } gwork.reshape(m + 3 * n); }