src/utils/sampling/Sequence.java
public Sequence join(Sequence otherSequence, boolean joinedVertically) throws MatrixException {
        if (getDepth() != otherSequence.getDepth()) throw new MatrixException("Depth of this sequence + " + getDepth() + " and other sequence " + otherSequence.getDepth() + " do not match.");
        Sequence joinedSequence = new Sequence(getDepth());
        for (Integer sampleIndex : keySet()) {
            if (!otherSequence.containsKey(sampleIndex)) throw new MatrixException("Other sequence does not contain sample index: " + sampleIndex);
            joinedSequence.put(sampleIndex, get(sampleIndex).join(otherSequence.get(sampleIndex), joinedVertically));
        }
        return joinedSequence;
    }
/**
     * Joins this and other sequence together by sample indices.
     *
     * @param otherSequence other sequence.
     * @param joinedVertically if true sequences are joined together vertically otherwise horizontally.
     * @return joined sequence.
     * @throws MatrixException throws exception if joining of matrices fails.
     */
Joins this and other sequence together by sample indices.
@param otherSequence other sequence.
@param joinedVertically if true sequences are joined together vertically otherwise horizontally.
@return joined sequence.
@throws MatrixException throws exception if joining of matrices fails.
Joins this and other sequence together by sample indices . @param otherSequence other sequence . @param joinedVertically if true sequences are joined together vertically otherwise horizontally . @return joined sequence . @throws MatrixException throws exception if joining of matrices fails .
public Sequence join(Sequence otherSequence, boolean joinedVertically) throws MatrixException {
        if (getDepth() != otherSequence.getDepth()) throw new MatrixException("Depth of this sequence + " + getDepth() + " and other sequence " + otherSequence.getDepth() + " do not match.");
        Sequence joinedSequence = new Sequence(getDepth());
        for (Integer sampleIndex : keySet()) {
            if (!otherSequence.containsKey(sampleIndex)) throw new MatrixException("Other sequence does not contain sample index: " + sampleIndex);
            joinedSequence.put(sampleIndex, get(sampleIndex).join(otherSequence.get(sampleIndex), joinedVertically));
        }
        return joinedSequence;
    }
public Sequence join ( Sequence otherSequence , boolean joinedVertically ) throws MatrixException { if ( getDepth ( ) != otherSequence . getDepth ( ) ) throw new MatrixException ( "Depth of this sequence + " + getDepth ( ) + " and other sequence " + otherSequence . getDepth ( ) + " do not match." ) ; Sequence joinedSequence = new Sequence ( getDepth ( ) ) ; for ( Integer sampleIndex : keySet ( ) ) { if ( ! otherSequence . containsKey ( sampleIndex ) ) throw new MatrixException ( "Other sequence does not contain sample index: " + sampleIndex ) ; joinedSequence . put ( sampleIndex , get ( sampleIndex ) . join ( otherSequence . get ( sampleIndex ) , joinedVertically ) ) ; } return joinedSequence ; }
Joins this and other sequence together by sample indices.
Joins this and other sequence together by sample indices .