commit | 0669e986265ff8bb876ac44872b6002755e4a5cf | [log] [tgz] |
---|---|---|
author | Jake Biesinger <jake.biesinger@gmail.com> | Tue May 21 16:43:51 2013 -0700 |
committer | Jake Biesinger <jake.biesinger@gmail.com> | Wed May 22 10:38:49 2013 -0700 |
tree | a471215a30c35cab048d80d81518b4660e3e2ed7 | |
parent | d891139d4ecd99f694c45e9ec5d9b4238ea99f5b [diff] |
add isPathNode to NodeWritable
diff --git a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java index df4e755..5c2a212 100644 --- a/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java +++ b/genomix/genomix-data/src/main/java/edu/uci/ics/genomix/type/NodeWritable.java
@@ -131,5 +131,12 @@ sbuilder.append(kmer.toString()).append(')'); return sbuilder.toString(); } + + /* + * Return if this node is a "path" compressible node, that is, it has an in-degree and out-degree of 1 + */ + public boolean isPathNode() { + return incomingList.getCountOfPosition() == 1 && outgoingList.getCountOfPosition() == 1; + } }