|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ChromAb.FragDecom
Class generates a fragment decomposition from a pattern for a specified label. The class stores four EdgeLists, one for each type of fragment (TC, TNC, NTC, or NTNC). This requires that all manifest breaks are present, specifically, that no edge has more than one centromere or more than one telomere, i.e. (y) is not allowed. Methods are those used for obtaining a reduced fragment decomposition.
Field Summary | |
private EdgeList[] |
edgeList
|
private java.lang.String |
label
|
static int |
NTC
|
static int |
NTNC
|
static int |
TC
|
static int |
TNC
|
Constructor Summary | |
FragDecom(FragDecom fd)
Constructor makes a new FragDecom from another one by making new copies of the edgeList for each category. |
|
FragDecom(Pattern p,
java.lang.String label)
Constructor takes a Pattern object and a specified label. |
Method Summary | |
void |
addEdge(int[] edge,
int type)
Add an edge to FD type. |
void |
addEdge(int a,
int b,
int type)
Add an edge to FD type. |
int[] |
freeEnds(int type)
Returns an integer array of all the free ends of the specified type. |
int[] |
getEdge(int index,
int type)
Returns the edge at an index of the specified type |
int[] |
getEdgeIncidentOn(int vertex)
Returns the edge incident on a vertex |
int[] |
getEdgeIncidentOn(int vertex,
int type)
Returns the edge incident on a vertex in the specified FD type. |
EdgeList |
getEdgeList(int type)
Returns the EdgeList for the specified type |
java.lang.String |
getLabel()
Returns the label with respect to which this fragment decomposition was taken |
int |
number(int type)
Returns the number of edges in the specified category. |
int |
numberOfFreeEnds()
Returns the number of free ends |
void |
removeEdge(int[] edge)
Remove the specified edge for the fragment decomposition |
void |
removeEdge(int[] edge,
int type)
Removes the specified edge from the specified type |
void |
removeEdgeIncidentOn(int vertex,
int type)
Removes the edge incident on a vertex for a particular FD type |
void |
replacePartner(int vertex,
int new_partner,
int old_type,
int new_type)
Replaces the partner of a vertex with a new vertex and changes the type. |
void |
replaceVertex(int vertex,
int new_vertex,
int old_type,
int new_type)
Changes the value of vertex and changes the type of its edge. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int TC
public static final int TNC
public static final int NTC
public static final int NTNC
private EdgeList[] edgeList
private java.lang.String label
Constructor Detail |
public FragDecom(Pattern p, java.lang.String label)
p
- final aberration pattern with all manifest misrejoinings.label
- String with respect to which to perform the decomposition.public FragDecom(FragDecom fd)
fd
- fragment decomposition to clone.Method Detail |
public int number(int type)
type
- FD typepublic int numberOfFreeEnds()
public java.lang.String getLabel()
public int[] freeEnds(int type)
type
- FD type
public EdgeList getEdgeList(int type)
type
- FD type
public void removeEdge(int[] edge, int type)
edge
- edge to removetype
- FD typepublic void removeEdge(int[] edge)
edge
- edge to removepublic void removeEdgeIncidentOn(int vertex, int type)
vertex
- vertex whose edge we'd like to removetype
- FD typepublic void replacePartner(int vertex, int new_partner, int old_type, int new_type)
vertex
- vertex whose partner we'd like to changenew_partner
- value of new partnerold_type
- initial FD type of edge incident on vertex.new_type
- new FD type of edge (vertex, new_partner)public void replaceVertex(int vertex, int new_vertex, int old_type, int new_type)
vertex
- vertex we'd like to changenew_vertex
- value we'd like to change it toold_type
- initial FD type of edge incident on vertexnew_type
- new FD type of edge (new_vertex, vertex's partner)public void addEdge(int[] edge, int type)
edge
- edge to enter (note that edges are copied into the fragment decomposition by value, so edges
may be added without fear of how manipulations to the FragDecom object might alter them.)type
- FD typepublic void addEdge(int a, int b, int type)
a
- first vertexb
- second vertextype
- FD typepublic int[] getEdge(int index, int type)
index
- index of edgetype
- FD type
public int[] getEdgeIncidentOn(int vertex, int type)
vertex
- vertex to search fortype
- FD type
return edge incident on vertex.public int[] getEdgeIncidentOn(int vertex)
vertex
- vertex to search for
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |