Class MusicVertex

java.lang.Object
  |
  +--MusicVertex
Direct Known Subclasses:
CompoundVertex, SimpleVertex

public abstract class MusicVertex
extends java.lang.Object

A MusicVertex is one of the two basic components of a MusicGraph, the other being the MusicEdge. A MusicVertex must be either a SimpleVertex or a CompoundVertex, and therefore this class is abstract, describing their common features. A SimpleVertex represents a note from a Score, a CompoundVertex represents a subgraph.


Field Summary
 java.util.Vector inEdges
          Vector of MusicEdge going into this MusicVertex.
 java.awt.Point lowerRightPosition
          The lower right point of the bounding box of this MusicVertex in the GraphGui canvas.
 int maxDistanceFromEnd
          The maximal distance to the last MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.
 int maxDistanceFromStart
          The maximal distance from the first MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.
 int minDistanceFromEnd
          The minmal distance to the last MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.
 int minDistanceFromStart
          The minimal distance from the first MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.
 long objectTimeStamp
          A time stamp which is only set at the creation of this MusicVertex object, it is used to construct a total order of music vertices, allowing us to unambgiuously sort Vectors of music vertices.
 java.util.Vector outEdges
          Vector of MusicEdge going out of this MusicVertex.
 double starttime
          The starttime of this MusicVertex.
 java.awt.Point upperLeftPosition
          The upper left point ofthe bounding box of this MusicVertex in the GraphGui canvas.
 int useCounter
          A variable used for counting the number of subgraphs this MusicVertex has been included in for a given generation of the SimFinder.
 
Constructor Summary
MusicVertex()
           
 
Method Summary
abstract  MusicVertex deepClone()
          Returns a deep clone of this MusicVertex.
 java.lang.String distToString()
          Used for user interface purposese.
 double getEndtime()
          Returns the end time of this MusicVertex.
 java.util.Vector getFollowsEdges(java.util.Vector edg)
          Picks out the FOLLOW or WEAKFOLLOW edges in the input vector; input either inEdges or outEdges as parameter.
abstract  double getLength()
          Returns the length of this MusicVertex, which is equal to the endtime minus the starttime.
 java.util.Vector getProperFollowInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type FOLLOW or WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.
 java.util.Vector getProperFollowOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type FOLLOW or WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperSimultaneousInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type SIMULTANEOUS or WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperSimultaneousOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type SIMULTANEOUS or WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperStrongFollowInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type FOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.
 java.util.Vector getProperStrongFollowOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type FOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperStrongSimultaneousInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type SIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperStrongSimultaneousOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type SIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperWeakFollowInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.
 java.util.Vector getProperWeakFollowOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperWeakSimultaneousInEdges(Subgraph sg)
          Returns a new vector of those inEdges of type WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getProperWeakSimultaneousOutEdges(Subgraph sg)
          Returns a new vector of those outEdges of type WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter
 java.util.Vector getSimultaneousEdges(java.util.Vector edg)
          Picks out the SIMULTANEOUS edges in the input vector; input either inEdges or outEdges as parameter.
 java.util.Vector getStrongFollowsEdges(java.util.Vector edg)
          Picks out the strong FOLLOW edges in the input vector; input either inEdges or outEdges as parameter.
 java.util.Vector getStrongSimultaneousEdges(java.util.Vector edg)
          Picks out the strong SIMULTANEOUS edges in the input vector; input either inEdges or outEdges as parameter.
 boolean graphicLayoutDone()
          Returns true if this MusicVertex has been assigned a position in the graphical layout, otherwise false.
 java.lang.String graphPosToString()
          Used for user interface purposes.
 boolean isSink()
          Returns true if this MusicVertex is a sink IN THE MOTHERGRAPH.
 boolean isSource()
          Returns true if this MusicVertex is a source IN THE MOTHERGRAPH.
abstract  SimpleVertex resolveAnchor(java.util.Vector anchor)
          Resolve the anchor inside this MusicVertex that is pointed to by the parameter Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inEdges

public java.util.Vector inEdges
Vector of MusicEdge going into this MusicVertex.


outEdges

public java.util.Vector outEdges
Vector of MusicEdge going out of this MusicVertex.


upperLeftPosition

public java.awt.Point upperLeftPosition
The upper left point ofthe bounding box of this MusicVertex in the GraphGui canvas.


lowerRightPosition

public java.awt.Point lowerRightPosition
The lower right point of the bounding box of this MusicVertex in the GraphGui canvas.


useCounter

public int useCounter
A variable used for counting the number of subgraphs this MusicVertex has been included in for a given generation of the SimFinder.


starttime

public double starttime
The starttime of this MusicVertex.


objectTimeStamp

public long objectTimeStamp
A time stamp which is only set at the creation of this MusicVertex object, it is used to construct a total order of music vertices, allowing us to unambgiuously sort Vectors of music vertices.


maxDistanceFromStart

public int maxDistanceFromStart
The maximal distance from the first MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.


minDistanceFromStart

public int minDistanceFromStart
The minimal distance from the first MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.


maxDistanceFromEnd

public int maxDistanceFromEnd
The maximal distance to the last MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.


minDistanceFromEnd

public int minDistanceFromEnd
The minmal distance to the last MusicVertex in the mother graph, calculated along ONLY strong FOLLOW-edges where each edge has a weight of 1.

Constructor Detail

MusicVertex

public MusicVertex()
Method Detail

getLength

public abstract double getLength()
Returns the length of this MusicVertex, which is equal to the endtime minus the starttime.


getEndtime

public double getEndtime()
Returns the end time of this MusicVertex.


graphicLayoutDone

public boolean graphicLayoutDone()
Returns true if this MusicVertex has been assigned a position in the graphical layout, otherwise false.


isSink

public boolean isSink()
Returns true if this MusicVertex is a sink IN THE MOTHERGRAPH.


isSource

public boolean isSource()
Returns true if this MusicVertex is a source IN THE MOTHERGRAPH.


getStrongFollowsEdges

public java.util.Vector getStrongFollowsEdges(java.util.Vector edg)
Picks out the strong FOLLOW edges in the input vector; input either inEdges or outEdges as parameter. Returns a Vector of MusicEdge.


getFollowsEdges

public java.util.Vector getFollowsEdges(java.util.Vector edg)
Picks out the FOLLOW or WEAKFOLLOW edges in the input vector; input either inEdges or outEdges as parameter. Returns a Vector of MusicEdge.


getStrongSimultaneousEdges

public java.util.Vector getStrongSimultaneousEdges(java.util.Vector edg)
Picks out the strong SIMULTANEOUS edges in the input vector; input either inEdges or outEdges as parameter. Returns a Vector of MusicEdge.


getSimultaneousEdges

public java.util.Vector getSimultaneousEdges(java.util.Vector edg)
Picks out the SIMULTANEOUS edges in the input vector; input either inEdges or outEdges as parameter. Returns a Vector of MusicEdge.


getProperFollowInEdges

public java.util.Vector getProperFollowInEdges(Subgraph sg)
Returns a new vector of those inEdges of type FOLLOW or WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.


getProperWeakFollowInEdges

public java.util.Vector getProperWeakFollowInEdges(Subgraph sg)
Returns a new vector of those inEdges of type WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.


getProperStrongFollowInEdges

public java.util.Vector getProperStrongFollowInEdges(Subgraph sg)
Returns a new vector of those inEdges of type FOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter.


getProperFollowOutEdges

public java.util.Vector getProperFollowOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type FOLLOW or WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperWeakFollowOutEdges

public java.util.Vector getProperWeakFollowOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type WEAKFOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperStrongFollowOutEdges

public java.util.Vector getProperStrongFollowOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type FOLLOW to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperSimultaneousInEdges

public java.util.Vector getProperSimultaneousInEdges(Subgraph sg)
Returns a new vector of those inEdges of type SIMULTANEOUS or WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperWeakSimultaneousInEdges

public java.util.Vector getProperWeakSimultaneousInEdges(Subgraph sg)
Returns a new vector of those inEdges of type WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperStrongSimultaneousInEdges

public java.util.Vector getProperStrongSimultaneousInEdges(Subgraph sg)
Returns a new vector of those inEdges of type SIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperSimultaneousOutEdges

public java.util.Vector getProperSimultaneousOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type SIMULTANEOUS or WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperWeakSimultaneousOutEdges

public java.util.Vector getProperWeakSimultaneousOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type WEAKSIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


getProperStrongSimultaneousOutEdges

public java.util.Vector getProperStrongSimultaneousOutEdges(Subgraph sg)
Returns a new vector of those outEdges of type SIMULTANEOUS to this vertex that are also in the edgelist for the subgraph given as input parameter


graphPosToString

public java.lang.String graphPosToString()
Used for user interface purposes.


distToString

public java.lang.String distToString()
Used for user interface purposese.


resolveAnchor

public abstract SimpleVertex resolveAnchor(java.util.Vector anchor)
Resolve the anchor inside this MusicVertex that is pointed to by the parameter Vector.


deepClone

public abstract MusicVertex deepClone()
Returns a deep clone of this MusicVertex.