Build node Matrix.

@param nodeSequence an array contains node number for each atom
@return node Matrix
428899
public double[][] buildNodeMatrix(double[] nodeSequence) {
        int i, j, k;
        for (i = 0; i < nodeNumber; i++) {
            nodeMatrix[i][0] = nodeSequence[i];
            for (j = 1; j <= layerNumber; j++) {
                nodeMatrix[i][j] = 0.0;
                for (k = 0; k < nodeNumber; k++) {
                    if (apspMatrix[i][k] == j) {
                        nodeMatrix[i][j] += nodeSequence[k];
                    }
                }
            }
        }
        return nodeMatrix;
    }
766364
public Set<N> getChildren(N n)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.get(n);
        
        if(p == null)
            return null;
        
        return p.getOutgoing();
    }
279432
public List<JoinNode> generateAllNodesJoinOrder() {
        ArrayList<JoinNode> nodes = new ArrayList<>();
        listNodesJoinOrderRecursive(nodes, true);
        return nodes;
    }
384546
public static List<Element> toElementList(NodeList nodeList) {
		List<Element> elements = new ArrayList<Element>();
		for (int i = 0; i < nodeList.getLength(); i++) {
			Node node = nodeList.item(i);
			if (node instanceof Element) {
				elements.add((Element) node);
			}
		}
		return elements;
	}
184687
@Override
    public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection, List<String> fields) {
        return getSequence(tableDef, collection, fields, null);
    }
778870
function() {
    var rows = this.elements.length, cols = this.elements[0].length;
    var elements = [], ni = cols, i, nj, j;
    do { i = cols - ni;
      elements[i] = [];
      nj = rows;
      do { j = rows - nj;
        elements[i][j] = this.elements[j][i];
      } while (--nj);
    } while (--ni);
    return Matrix.create(elements);
  }
157422
public static Matrix identity(int N) {
        Matrix I = new Matrix(N, N);
        for (int i = 0; i < N; i++) {
            I.data[i][i] = 1;
        }
        return I;
    }
406533
@Override
		public List<Sequence<NucleotideCompound>> createSequences(Sequence<NucleotideCompound> originalSequence) {
				if(shortCutTranslation) {
						List<Sequence<NucleotideCompound>> result = new ArrayList<Sequence<NucleotideCompound>>(1);
						result.add(wrapToRna(originalSequence));
						return result;
				}
				else {
						return super.createSequences(originalSequence);
				}
		}
701669
public final Node getChildAtIndex(int i) {
    Node n = first;
    while (i > 0) {
      n = n.next;
      i--;
    }
    return n;
  }
364460
@Override
	public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection, List<String> fields,
			EntitySequenceOptions options) {
	    if (fields == null || fields.contains(ALLSCALARMARK))
	        fields = ALLSCALARFIELDS;
		return new DBEntityRootCollection<T>(tableDef, fields, collection, this, tableDef.getTableName(), EntitySequenceOptions.getOptions(options, DBEntitySequenceOptions.defaultOptions));
	}
608561
public FastqBuilder withSequence(final String sequence)
	{
		if (sequence == null)
		{
			throw new IllegalArgumentException("sequence must not be null");
		}
		if (this.sequence == null)
		{
			this.sequence = new StringBuilder(sequence.length());
		}
		this.sequence.replace(0, this.sequence.length(), sequence);
		return this;
	}
1154141
@Override
    public Sequence<T> nextSequence() {
        Sequence<T> sequence = currentIterator.next();
        sequence.setSequenceId(tagger.getAndIncrement());
        return sequence;
    }
1271099
public double[][] buildTrialNodeMatrix(double[] weight) {
        int i, j, k;
        for (i = 0; i < nodeNumber; i++) {
            nodeMatrix[i][0] = weight[i + 1];
            for (j = 1; j <= layerNumber; j++) {
                nodeMatrix[i][j] = 0.0;
                for (k = 0; k < nodeNumber; k++) {
                    if (apspMatrix[i][k] == j) {
                        nodeMatrix[i][j] += weight[k + 1];
                    }
                }
            }
        }
        return nodeMatrix;
    }
1268934
private Node[][][] initialLattice(Instance inst) {
		int[][][] data = (int[][][]) inst.getData();
		length = inst.length();

		Node[][][] lattice = new Node[2][length][];
		for (int i = 0; i < length; i++) {
			lattice[0][i] = new Node[ysize[0]];
			for (int j = 0; j < ysize[0]; j++) {
				lattice[0][i][j] = new Node(ysize[0], ysize[1]);
			}
			initialClique(lattice[0][i], data[0][i], orders[0], ysize[0],
					ysize[1]);

			lattice[1][i] = new Node[ysize[1]];
			for (int j = 0; j < ysize[1]; j++) {
				lattice[1][i][j] = new Node(ysize[1], ysize[0]);
			}
			initialClique(lattice[1][i], data[1][i], orders[1], ysize[1],
					ysize[0]);
		}

		return lattice;
	}
956265
public List<List<Writable>> executeSequence(List<List<Writable>> inputSequence) {
        return executeSequenceToSequence(inputSequence);
    }
516296
public static NodeSequence withBatch( final Batch sequence ) {
        if (sequence == null) return emptySequence(1);
        return new NodeSequence() {
            private boolean done = false;

            @Override
            public int width() {
                return sequence.width();
            }

            @Override
            public long getRowCount() {
                return sequence.rowCount();
            }

            @Override
            public boolean isEmpty() {
                return sequence.isEmpty();
            }

            @Override
            public Batch nextBatch() {
                if (done) return null;
                done = true;
                return sequence;
            }

            @Override
            public void close() {
            }

            @Override
            public String toString() {
                return "(sequence-with-batch width=" + width() + " " + sequence + " )";
            }
        };
    }
235155
@Override
	public <T> EntitySequence getSequence(TableDefinition tableDef, Iterable<T> collection) {
		return getSequence(tableDef, collection, null, null);
	}