|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MusicGraph | +--MotherGraph
A MotherGraph is a MusicGraph
which owns its vertices and
edges. Subgraph
s only point to vertices and edges owned by
their respective mother graphs. All subgraphs must have a mother
graph, whereas a mother graph is its own, so to speak. Subgraphs can
be changed in any way you like, but changing a mother graph is a
serious matter because it affects all subgraphs that may be pointing
to its vertices and edges. Proceed with caution. The only such
manipulation is the compoundSubsitution() method.
Field Summary | |
jm.music.data.Score |
theScore
The Score object that this MotherGraph originated from. |
Fields inherited from class MusicGraph |
edges, title, vertices |
Constructor Summary | |
MotherGraph(java.lang.String filename,
boolean includeInterPartEdges)
Constructs a MotherGraph from a midifile. |
|
MotherGraph(java.lang.String filename,
boolean includeInterPartEdges,
boolean combineTies,
boolean combineRests)
Constructs a graph from a Musedata file |
|
MotherGraph(java.util.Vector vert,
java.util.Vector edg,
java.lang.String t,
jm.music.data.Score sc)
A neutral constructor. |
Method Summary | |
void |
calculateVertexDistances()
This method is used to run through the graph and once and for all set the max/minDistanceFromStart/End variables in all vertices. |
java.lang.Object |
clone()
Returns a *shallow* clone of this MotherGraph, which is a NonSeqSubgraph -- Call MusicGraph.deepClone() instead if you really
really want to do the entire deep cloning. |
CompoundVertex |
compoundSubstitution(Subgraph sg,
Nonterminal nt,
SimilarityMeasure measure,
SimMeasureResult smresult)
Substitutes a subgraph of this MotherGraph with a newly created CompoundVertex . |
jm.music.data.Score |
convertToScore()
Definition of abstract method from class MusicGraph ;
simply returns the originating Score just as getScore(). |
java.util.Vector |
getAllProperFollowInEdges(boolean includeWeakEdges)
Returns a Vector of Vector of MusicEdge. |
java.util.Vector |
getAllProperFollowOutEdges(boolean includeWeakEdges)
Returns a Vector of Vector of MusicEdge. |
java.util.Vector |
getAllProperInEdges(boolean includeWeakEdges)
Returns a Vector of Vector of MusicEdge. |
java.util.Vector |
getAllProperOutEdges(boolean includeWeakEdges)
Returns a Vector of Vector of MusicEdge. |
java.util.Vector |
getAllSons(java.util.Vector vert)
Returns a Vector of MusicVertex which follow upon any
of the music vertices in the input vector, i.e. there is a
FOLLOWS MusicEdge from the vertex in the input vector
to the one in the output vector. |
int |
getMaximalSequentialSubgraphSize()
Returns the size of the maximal sequential subgraph that could possibly be constructed from this MotherGraph. |
static MotherGraph |
getMomFromFile(java.lang.String filename,
boolean interpartEdges,
boolean combineTies,
boolean combineRests)
This static method is used to create a MotherGraph from any (supported) file type. |
MotherGraph |
getMotherGraph()
Definition of abstract method from class MusicGraph . |
NonSeqSubgraph |
getRandomNonSeqSubgraph(int size)
Constructs a random non-sequential subgraph of this MotherGraph. |
SeqSubgraph |
getRandomSeqSubgraph(int size)
Constructs a random sequential subgraph of this MotherGraph. |
jm.music.data.Score |
getScore()
Returns the originating Score object; if this MotherGraph was created from a midifile, the conversion using the jMusic package created such a Score object; if this MotherGraph was created from a MuseData file, the Score is a dummy object. |
void |
resetUsageInfo()
Sets the usage counters of all vertices in this MotherGraph to zero. |
SeqSubgraph |
sequentialClone()
Returns a *shallow* clone of this MotherGraph which is a SeqSubgraph , if this MotherGraph is in fact
sequential; if not, null is returned. |
java.lang.String |
toString()
Returns a string with the toString's of all vertices and edges in this MusicGraph. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public jm.music.data.Score theScore
Constructor Detail |
public MotherGraph(java.util.Vector vert, java.util.Vector edg, java.lang.String t, jm.music.data.Score sc)
public MotherGraph(java.lang.String filename, boolean includeInterPartEdges)
public MotherGraph(java.lang.String filename, boolean includeInterPartEdges, boolean combineTies, boolean combineRests)
Method Detail |
public java.lang.Object clone()
NonSeqSubgraph
-- Call MusicGraph.deepClone() instead if you really
really want to do the entire deep cloning.
clone
in class MusicGraph
public SeqSubgraph sequentialClone()
SeqSubgraph
, if this MotherGraph is in fact
sequential; if not, null is returned.
public java.lang.String toString()
MusicGraph
toString
in class MusicGraph
public void calculateVertexDistances()
public NonSeqSubgraph getRandomNonSeqSubgraph(int size) throws java.lang.Exception
java.lang.Exception
public SeqSubgraph getRandomSeqSubgraph(int size)
public java.util.Vector getAllProperFollowInEdges(boolean includeWeakEdges)
getAllProperFollowInEdges
in class MusicGraph
public java.util.Vector getAllProperFollowOutEdges(boolean includeWeakEdges)
getAllProperFollowOutEdges
in class MusicGraph
public java.util.Vector getAllProperInEdges(boolean includeWeakEdges)
getAllProperInEdges
in class MusicGraph
public java.util.Vector getAllProperOutEdges(boolean includeWeakEdges)
getAllProperOutEdges
in class MusicGraph
public void resetUsageInfo()
public jm.music.data.Score getScore()
getScore
in class MusicGraph
public int getMaximalSequentialSubgraphSize()
getMaximalSequentialSubgraphSize
in class MusicGraph
public java.util.Vector getAllSons(java.util.Vector vert)
MusicVertex
which follow upon any
of the music vertices in the input vector, i.e. there is a
FOLLOWS MusicEdge
from the vertex in the input vector
to the one in the output vector.
public MotherGraph getMotherGraph()
MusicGraph
.
getMotherGraph
in class MusicGraph
public jm.music.data.Score convertToScore()
MusicGraph
;
simply returns the originating Score just as getScore().
convertToScore
in class MusicGraph
public CompoundVertex compoundSubstitution(Subgraph sg, Nonterminal nt, SimilarityMeasure measure, SimMeasureResult smresult)
CompoundVertex
.
public static MotherGraph getMomFromFile(java.lang.String filename, boolean interpartEdges, boolean combineTies, boolean combineRests) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |