|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.utils.UserDataDelegate edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph edu.uci.ics.jung.graph.impl.AbstractSparseGraph edu.uci.ics.jung.graph.impl.SparseGraph com.hp.hpl.guess.Graph
Nested Class Summary |
Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer |
UserDataContainer.CopyAction |
Field Summary |
Fields inherited from interface edu.uci.ics.jung.graph.Graph |
DIRECTED_EDGE, NOT_PARALLEL_EDGE, SIMPLE_EDGE, UNDIRECTED_EDGE |
Fields inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
SUBSET_MANAGER |
Constructor Summary | |
Graph(FrameListener display,
InterpreterAbstraction interp)
create a new graph. |
|
Graph(FrameListener display,
InterpreterAbstraction interp,
boolean multiedge)
create a new graph. |
Method Summary | |
void |
add(PySequence seq)
add nodes and edges from the graph |
DirectedEdge |
addDirectedEdge(Node source,
Node dest)
user's API for adding a new directed edge to the graph and database |
DirectedEdge |
addDirectedEdgeWID(Node source,
Node dest,
int id)
user's API for adding a new directed edge to the graph and database |
Edge |
addEdge(Edge e)
used to load edges from the database into the graph |
UndirectedEdge |
addEdge(Node node1,
Node node2)
user's API shortcut for adding a new undirected edge. |
Field |
addEdgeField(String fieldName,
int sqlType,
Object defaultValue)
|
Edge |
addEdgeNoCheck(Edge e)
use this if you know the storage object already contains the edge. |
Node |
addNode(Node n)
used to load nodes from the database into the graph |
Node |
addNode(String name)
user's API for adding a new node to the graph and database |
Field |
addNodeField(String fieldName,
int sqlType,
Object defaultValue)
|
UndirectedEdge |
addUndirectedEdge(Node node1,
Node node2)
|
UndirectedEdge |
addUndirectedEdgeWID(Node node1,
Node node2,
int id)
|
Set |
biComponentClusters()
do Bi-Component Clustering |
void |
binPackLayout()
packs all nodes |
void |
binPackLayout(boolean rescale)
packs all nodes |
void |
centerAfterLayout(boolean state)
should we center after doing a layout disable this to control it yourself |
void |
circleLayout()
places all nodes in a circle |
void |
circleLayout(Field f,
Node c)
places all nodes in a circle with node c in the middle and its neighbors around that center with a radius proportional to field f (all nodes that are not neighbors of c will be left as is) |
void |
circleLayout(Field f,
Node c,
double xorigin,
double yorigin)
places all nodes in a circle with node c in the middle and its neighbors around that center with a radius proportional to field f (all nodes that are not neighbors of c will be left as is) |
static Set |
clusters(Graph graph,
GraphClusterer clusterer)
meta clustering algorithm, takes a clustering algorithm and a graph and returns a set of sets |
void |
colorize(Field f)
|
void |
colorize(Field f,
Color start,
Color end)
|
void |
colorize(Field f,
Color start,
Color middle,
Color end)
|
void |
colorize(Field f,
String start,
String end)
|
void |
colorize(Field f,
String start,
String middle,
String end)
|
Set |
complement(GraphElement t)
returns all nodes/edges in the graph that are NOT the argument node/edge |
Set |
complement(PySequence seq)
returns the complement (e.g. |
void |
computeAbstractRanker(AbstractRanker centrality,
String guessKey,
ArchetypeGraph ag)
computes the ranking for nodes or edges and deposits the results based on guessKey |
void |
computeBetweennessCentrality()
|
void |
computeDegreeDistributionRank()
|
void |
computeDegrees()
|
void |
computeHITS()
|
void |
computePageRank()
|
void |
computeRandomWalkBetweenness()
|
void |
dagLayout()
DAG |
double |
density()
|
Set |
edgeBetweennessClusters(int numEdgesToRemove)
do Edge betweenness clustering |
Set |
exactFlowCommunity(int cohesion)
doesn't do anything right now |
void |
exportGDF(String filename)
|
void |
frLayout()
Fruchterman-Rheingold, puts nodes in 1000 x 1000 square |
void |
frLayout(int width,
int height)
Fruchterman-Rheingold into a width x height grid |
void |
gemLayout()
GEM Layout |
Edge |
getEdgeByID(Integer id)
lookup a edge by id |
EdgeSchema |
getEdgeSchema()
|
long |
getLastModTime()
get the time of last modification |
Node |
getNodeByName(String name)
lookup a node by name |
Set |
getNodes()
|
NodeSchema |
getNodeSchema()
|
Number |
getNumber(ArchetypeEdge e)
for NumberEdgeValue interface, returns the weight of the given edge. |
double |
getPageRankBias()
|
Collection |
groupAndSortBy(Field field)
|
Collection |
groupAndSortBy(PySequence seq,
Field field)
|
Collection |
groupAndSortEdgesBy(String field)
|
Collection |
groupAndSortNodesBy(String field)
|
Collection |
groupBy(Field field)
|
Collection |
groupBy(PySequence seq,
Field field)
|
Collection |
groupEdgesBy(String field)
|
Collection |
groupNodesBy(String field)
|
void |
hideDisconnected()
|
void |
isomLayout()
ISOM Layout, asks every 30 seconds if you want to continue |
void |
isomLayout(int max)
ISOM Layout for max steps |
void |
jfrLayout()
the JUNG Fructerman-Rheingold Layout |
void |
jkkLayout1()
the JUNG Kamada-Kawai (regular) |
void |
jkkLayout2()
the JUNG Kamada-Kawai (int) |
void |
jSpringLayout()
the JUNG Spring Layout (seems a little broken). |
void |
jSpringLayout(int max)
run the JUNG spring layout for max iterations |
void |
kkLayout()
Kamada-Kawai, puts nodes in 1000 x 1000 square |
void |
kkLayout(int width,
int height)
Kamada-Kawai into a width x height grid |
void |
layout(Layout lay)
basic layout command, runs until completes or 30 seconds depending on if the layout is iterative |
void |
layout(Layout lay,
int mi)
runs the layout for some number of iterations (mi). |
void |
makeBarabasiAlbertRandom(int vert,
int edges,
int evolve)
|
void |
makeEppsteinRandom(int nodes,
int edges,
int r)
|
void |
makeErdosRenyiRandom(int nodes,
double p)
|
void |
makeFromDL(String filename)
|
void |
makeFromGDF(String filename)
|
void |
makeFromGenerator(GraphGenerator gg)
|
void |
makeFromGML(String filename)
|
void |
makeFromPajek(String filename)
|
void |
makeKleinbergRandom(int nodes,
double clust)
|
void |
makeLattice1DRandom(int nodes,
boolean tor)
|
void |
makeLattice2DRandom(int nodes,
boolean tor)
|
void |
makeSimpleDirectedRandom(int nodes,
int edges)
|
void |
makeSimpleRandom(int nodes,
int edges)
|
void |
mdsLayout()
Multidimensional scaling layout based on edge weight |
void |
morph(int state,
long duration)
|
void |
morph(String state,
long duration)
|
void |
moveLayout(double newX,
double newY)
|
void |
moveLayout(int newX,
int newY)
moves the nodes to a new origin |
void |
physicsLayout()
physics layout, asks every 30 seconds if you want to keep running |
void |
physicsLayout(boolean gather,
int max)
physics layout |
void |
physicsLayout(int max)
run physics layout for max steps |
void |
radialLayout(Node center)
places all nodes in a growing radius around center |
void |
radialLayout(Node center,
PySequence seq)
|
void |
randomLayout()
randomly places nodes in a 1000 x 1000 grid |
void |
randomLayout(int width,
int height)
randomly places nodes in a width x height grid |
void |
readjustEdges()
moves edges so they don't overlap |
Set |
remove(PySequence seq)
remove nodes and edges from the graph |
void |
removeComplete(PySequence seq)
remove nodes and edges completely from the system (all states) |
Set |
removeDisconnected()
|
Set |
removeEdge(Edge e)
remove an edge from the graph |
void |
removeEdgeComplete(Edge e)
removes an edge completely. |
Set |
removeNode(Node n)
remove a node from the graph |
void |
removeNodeComplete(Node n)
removes a node completely (node, and all edges connected to it, will likely be unrecoverable). |
Set |
removeSelfLoops()
|
void |
rescaleLayout(double percent)
rescales the layout to %percent |
void |
rescaleLayout(double xpercent,
double ypercent)
rescales the layout to %xpercent X %ypercent |
void |
rescaleLayout(int width,
int height)
rescales nodes to fit into width x height |
void |
resetLastMod()
resets the last mod so we don't have to update fields |
void |
resizeLinear(Field f,
double start,
double end)
|
void |
resizeRandom(Field f,
double start,
double end)
|
void |
setIdToEdge(Edge e)
put the edge into the table, will not work if the id = -1. |
void |
setNumber(ArchetypeEdge edge,
Number number)
needed for NumberEdgeValue interface |
void |
setPageRankBias(double bias)
|
void |
setRankerWeightField(Field f)
|
Collection |
sortBy(Field field)
|
Collection |
sortBy(PySequence seq,
Field field)
|
void |
springLayout()
spring layout, runs for 30 seconds and asks if you want to continue |
void |
springLayout(int max)
spring layout for max iterations |
void |
sugiyamaLayout()
Sugiyama |
void |
sugiyamaLayout(boolean bends)
Sugiyama |
void |
sugiyamaLayout2()
Sugiyama |
static Color |
toColor(Object object)
|
static double |
toDouble(Object object)
|
void |
translateLayout(double newX,
double newY)
|
void |
translateLayout(int newX,
int newY)
moves the nodes to a new origin |
Set |
weakComponentClusters()
do weak component clustering |
void |
weightedKKLayout()
the JUNG Kamada-Kawai (regular) |
void |
weightedSpringLayout(int min,
int max)
spring layout, runs for 30 seconds and asks if you want to continue |
void |
weightedSpringLayout(int minL,
int maxL,
int max)
spring layout for max iterations |
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseGraph |
addEdge, addVertex, getEdges, getVertices, isDirected, removeEdge, removeEdges, removeVertex, removeVertices |
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph |
addListener, copy, getEdgeConstraints, getVertexConstraints, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toString |
Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate |
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
addListener, copy, getEdgeConstraints, getVertexConstraints, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener |
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum |
Constructor Detail |
public Graph(FrameListener display, InterpreterAbstraction interp)
display
- something we render tointerp
- the interpreterpublic Graph(FrameListener display, InterpreterAbstraction interp, boolean multiedge)
display
- something we render tointerp
- the interpreterMethod Detail |
public long getLastModTime()
public void resetLastMod()
public Node getNodeByName(String name)
name
- the node name
public Edge getEdgeByID(Integer id)
id
- the edge id
public void setIdToEdge(Edge e)
e
- the edgepublic Node addNode(Node n)
n
- the node we're adding
public Node addNode(String name)
name
- the new node name
public Edge addEdge(Edge e)
e
- the edge to add
public Edge addEdgeNoCheck(Edge e)
public DirectedEdge addDirectedEdge(Node source, Node dest)
source
- source nodedest
- destinatin node
public DirectedEdge addDirectedEdgeWID(Node source, Node dest, int id)
source
- source nodedest
- destinatin nodeid
- override the id creation from the storage factory
public UndirectedEdge addUndirectedEdge(Node node1, Node node2)
public UndirectedEdge addUndirectedEdgeWID(Node node1, Node node2, int id)
public UndirectedEdge addEdge(Node node1, Node node2)
public Set removeNode(Node n)
n
- the node to removepublic void removeNodeComplete(Node n)
n
- the node to removepublic void removeEdgeComplete(Edge e)
e
- the node to removepublic void removeComplete(PySequence seq)
seq
- the nodes + edgespublic Set removeEdge(Edge e)
e
- the edge to removepublic Set remove(PySequence seq)
seq
- the nodes + edgespublic Set complement(PySequence seq)
seq
- the nodes and/or edgespublic Set complement(GraphElement t)
public void add(PySequence seq)
seq
- the nodes + edgespublic Set getNodes()
public static Color toColor(Object object)
public static double toDouble(Object object)
public void readjustEdges()
public void kkLayout()
public void sugiyamaLayout()
public void sugiyamaLayout(boolean bends)
public void sugiyamaLayout2()
public void dagLayout()
public void frLayout()
public void mdsLayout()
public void moveLayout(int newX, int newY)
newX
- newY
- public void moveLayout(double newX, double newY)
public void translateLayout(int newX, int newY)
newX
- newY
- public void translateLayout(double newX, double newY)
public void rescaleLayout(int width, int height)
width
- the rescale widthheight
- the rescale heightpublic void rescaleLayout(double percent)
percent
- the percent to shrink/growpublic void rescaleLayout(double xpercent, double ypercent)
xpercent
- the percent to shrink/growypercent
- the percent to shrink/growpublic void radialLayout(Node center)
center
- the node to put in the centerpublic void radialLayout(Node center, PySequence seq)
public void randomLayout()
public void randomLayout(int width, int height)
width
- widthheight
- heightpublic void jfrLayout()
public void jkkLayout1()
public void jkkLayout2()
public void weightedKKLayout()
public void frLayout(int width, int height)
width
- height
- public void kkLayout(int width, int height)
width
- height
- public void physicsLayout(boolean gather, int max)
gather
- merges connected nodes first (not very useful)max
- loops max timespublic void physicsLayout()
public void physicsLayout(int max)
max
- the number of stepspublic void jSpringLayout()
public void jSpringLayout(int max)
max
- the number of iterationspublic void circleLayout()
public void binPackLayout()
public void binPackLayout(boolean rescale)
public void circleLayout(Field f, Node c)
f
- the field to use to calc the radiusc
- the node to put in the centerpublic void circleLayout(Field f, Node c, double xorigin, double yorigin)
f
- the field to use to calc the radiusc
- the node to put in the centerxorigin
- the x location for the center nodeyorigin
- the y location for the center nodepublic void springLayout()
public void springLayout(int max)
max
- number of iterationspublic void weightedSpringLayout(int min, int max)
public void weightedSpringLayout(int minL, int maxL, int max)
max
- number of iterationspublic void gemLayout()
public void isomLayout()
public void isomLayout(int max)
max
- the number of iterationspublic void layout(Layout lay)
lay
- the layout to runpublic void centerAfterLayout(boolean state)
public void layout(Layout lay, int mi)
lay
- the layout to runmi
- the maximum iterationspublic Set biComponentClusters()
public Set edgeBetweennessClusters(int numEdgesToRemove)
numEdgesToRemove
- edges to remove
public Set weakComponentClusters()
public Set exactFlowCommunity(int cohesion)
public static Set clusters(Graph graph, GraphClusterer clusterer)
graph
- the graph to analyzeclusterer
- the clustering algorithm to use
public void setNumber(ArchetypeEdge edge, Number number)
setNumber
in interface NumberEdgeValue
public Number getNumber(ArchetypeEdge e)
getNumber
in interface NumberEdgeValue
public void computeAbstractRanker(AbstractRanker centrality, String guessKey, ArchetypeGraph ag)
centrality
- the rankerguessKey
- the place to put the resultspublic void computeBetweennessCentrality()
public void setPageRankBias(double bias)
public double getPageRankBias()
public void setRankerWeightField(Field f)
public void computePageRank()
public void computeDegreeDistributionRank()
public void computeHITS()
public void computeRandomWalkBetweenness()
public void computeDegrees()
public Field addNodeField(String fieldName, int sqlType, Object defaultValue)
public Field addEdgeField(String fieldName, int sqlType, Object defaultValue)
public NodeSchema getNodeSchema()
public EdgeSchema getEdgeSchema()
public Collection sortBy(PySequence seq, Field field)
public Collection sortBy(Field field)
public Collection groupBy(PySequence seq, Field field)
public Collection groupBy(Field field)
public Collection groupAndSortBy(Field field)
public Collection groupAndSortBy(PySequence seq, Field field)
public Collection groupAndSortNodesBy(String field)
public Collection groupNodesBy(String field)
public Collection groupAndSortEdgesBy(String field)
public Collection groupEdgesBy(String field)
public void makeBarabasiAlbertRandom(int vert, int edges, int evolve)
public void makeSimpleRandom(int nodes, int edges)
public void makeSimpleDirectedRandom(int nodes, int edges)
public void makeEppsteinRandom(int nodes, int edges, int r)
public void makeErdosRenyiRandom(int nodes, double p)
public void makeLattice1DRandom(int nodes, boolean tor)
public void makeLattice2DRandom(int nodes, boolean tor)
public void makeKleinbergRandom(int nodes, double clust)
public void makeFromGenerator(GraphGenerator gg)
public void makeFromGML(String filename)
public void makeFromPajek(String filename)
public void makeFromDL(String filename)
public void makeFromGDF(String filename) throws IOException
IOException
public void exportGDF(String filename)
public void morph(String state, long duration)
public void morph(int state, long duration)
public void colorize(Field f)
public void colorize(Field f, Color start, Color end)
public void colorize(Field f, String start, String end)
public void colorize(Field f, Color start, Color middle, Color end)
public void colorize(Field f, String start, String middle, String end)
public void resizeRandom(Field f, double start, double end)
public void resizeLinear(Field f, double start, double end)
public double density()
public Set removeSelfLoops()
public Set removeDisconnected()
public void hideDisconnected()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |