1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
Usage
Generates a graph with a specified number of vertices, with
the density of edges specified by either an exact number of
edges or the probability of an edge. You may additionally
specify whether to begin with a random tree (which enforces
graph connectivity).
To create an instance of class vtkRandomGraphSource, simply
invoke its constructor as follows
obj = vtkRandomGraphSource
Methods
The class vtkRandomGraphSource has several methods that can
be used. They are listed below. Note that the documentation
is translated automatically from the VTK sources, and may
not be completely intelligible. When in doubt, consult the
VTK website. In the methods listed below, obj is an instance
of the vtkRandomGraphSource class.
* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkRandomGraphSource = obj.NewInstance ()
* vtkRandomGraphSource = obj.SafeDownCast (vtkObject o)
* int = obj.GetNumberOfVertices () - The number of vertices
in the graph.
* obj.SetNumberOfVertices (int ) - The number of vertices in
the graph.
* int = obj.GetNumberOfVerticesMinValue () - The number of
vertices in the graph.
* int = obj.GetNumberOfVerticesMaxValue () - The number of
vertices in the graph.
* int = obj.GetNumberOfEdges () - If UseEdgeProbability is
off, creates a graph with the specified number of edges.
Duplicate (parallel) edges are allowed.
* obj.SetNumberOfEdges (int ) - If UseEdgeProbability is
off, creates a graph with the specified number of edges.
Duplicate (parallel) edges are allowed.
* int = obj.GetNumberOfEdgesMinValue () - If
UseEdgeProbability is off, creates a graph with the
specified number of edges. Duplicate (parallel) edges are
allowed.
* int = obj.GetNumberOfEdgesMaxValue () - If
UseEdgeProbability is off, creates a graph with the
specified number of edges. Duplicate (parallel) edges are
allowed.
* double = obj.GetEdgeProbability () - If UseEdgeProbability
is on, adds an edge with this probability between 0 and 1
for each pair of vertices in the graph.
* obj.SetEdgeProbability (double ) - If UseEdgeProbability
is on, adds an edge with this probability between 0 and 1
for each pair of vertices in the graph.
* double = obj.GetEdgeProbabilityMinValue () - If
UseEdgeProbability is on, adds an edge with this
probability between 0 and 1 for each pair of vertices in
the graph.
* double = obj.GetEdgeProbabilityMaxValue () - If
UseEdgeProbability is on, adds an edge with this
probability between 0 and 1 for each pair of vertices in
the graph.
* obj.SetIncludeEdgeWeights (bool ) - When set, includes
edge weights in an array named "edge_weights". Defaults to
off. Weights are random between 0 and 1.
* bool = obj.GetIncludeEdgeWeights () - When set, includes
edge weights in an array named "edge_weights". Defaults to
off. Weights are random between 0 and 1.
* obj.IncludeEdgeWeightsOn () - When set, includes edge
weights in an array named "edge_weights". Defaults to off.
Weights are random between 0 and 1.
* obj.IncludeEdgeWeightsOff () - When set, includes edge
weights in an array named "edge_weights". Defaults to off.
Weights are random between 0 and 1.
* obj.SetEdgeWeightArrayName (string ) - The name of the
edge weight array. Default "edge weight".
* string = obj.GetEdgeWeightArrayName () - The name of the
edge weight array. Default "edge weight".
* obj.SetDirected (bool ) - When set, creates a directed
graph, as opposed to an undirected graph.
* bool = obj.GetDirected () - When set, creates a directed
graph, as opposed to an undirected graph.
* obj.DirectedOn () - When set, creates a directed graph, as
opposed to an undirected graph.
* obj.DirectedOff () - When set, creates a directed graph,
as opposed to an undirected graph.
* obj.SetUseEdgeProbability (bool ) - When set, uses the
EdgeProbability parameter to determine the density of
edges. Otherwise, NumberOfEdges is used.
* bool = obj.GetUseEdgeProbability () - When set, uses the
EdgeProbability parameter to determine the density of
edges. Otherwise, NumberOfEdges is used.
* obj.UseEdgeProbabilityOn () - When set, uses the
EdgeProbability parameter to determine the density of
edges. Otherwise, NumberOfEdges is used.
* obj.UseEdgeProbabilityOff () - When set, uses the
EdgeProbability parameter to determine the density of
edges. Otherwise, NumberOfEdges is used.
* obj.SetStartWithTree (bool ) - When set, builds a random
tree structure first, then adds additional random edges.
* bool = obj.GetStartWithTree () - When set, builds a random
tree structure first, then adds additional random edges.
* obj.StartWithTreeOn () - When set, builds a random tree
structure first, then adds additional random edges.
* obj.StartWithTreeOff () - When set, builds a random tree
structure first, then adds additional random edges.
* obj.SetAllowSelfLoops (bool ) - If this flag is set to
true, edges where the source and target vertex are the
same can be generated. The default is to forbid such
loops.
* bool = obj.GetAllowSelfLoops () - If this flag is set to
true, edges where the source and target vertex are the
same can be generated. The default is to forbid such
loops.
* obj.AllowSelfLoopsOn () - If this flag is set to true,
edges where the source and target vertex are the same can
be generated. The default is to forbid such loops.
* obj.AllowSelfLoopsOff () - If this flag is set to true,
edges where the source and target vertex are the same can
be generated. The default is to forbid such loops.
* obj.SetAllowParallelEdges (bool ) - When set, multiple
edges from a source to a target vertex are allowed. The
default is to forbid such loops.
* bool = obj.GetAllowParallelEdges () - When set, multiple
edges from a source to a target vertex are allowed. The
default is to forbid such loops.
* obj.AllowParallelEdgesOn () - When set, multiple edges
from a source to a target vertex are allowed. The default
is to forbid such loops.
* obj.AllowParallelEdgesOff () - When set, multiple edges
from a source to a target vertex are allowed. The default
is to forbid such loops.
* obj.SetGeneratePedigreeIds (bool ) - Add pedigree ids to
vertex and edge data.
* bool = obj.GetGeneratePedigreeIds () - Add pedigree ids to
vertex and edge data.
* obj.GeneratePedigreeIdsOn () - Add pedigree ids to vertex
and edge data.
* obj.GeneratePedigreeIdsOff () - Add pedigree ids to vertex
and edge data.
* obj.SetVertexPedigreeIdArrayName (string ) - The name of
the vertex pedigree id array. Default "vertex id".
* string = obj.GetVertexPedigreeIdArrayName () - The name of
the vertex pedigree id array. Default "vertex id".
* obj.SetEdgePedigreeIdArrayName (string ) - The name of the
edge pedigree id array. Default "edge id".
* string = obj.GetEdgePedigreeIdArrayName () - The name of
the edge pedigree id array. Default "edge id".
* obj.SetSeed (int ) - Control the seed used for pseudo-
random-number generation. This ensures that
vtkRandomGraphSource can produce repeatable results.
* int = obj.GetSeed () - Control the seed used for pseudo-
random-number generation. This ensures that
vtkRandomGraphSource can produce repeatable results.
* FreeMat_Documentation
* Visualization_Toolkit_Infovis_Classes
* Generated on Thu Jul 25 2013 17:18:33 for FreeMat by
doxygen_ 1.8.1.1
|