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
|
Usage
Creates a vtkGraph using one or two vtkSQLQuery's. The first
(required) query must have one row for each arc in the
graph. The query must have two columns which represent the
source and target node ids.
The second (optional) query has one row for each node in the
graph. The table must have a field whose values match those
in the arc table. If the node table is not given, a node
will be created for each unique source or target identifier
in the arc table.
The source, target, and node ID fields must be of the same
type, and must be either vtkStringArray or a subclass of
vtkDataArray.
All columns in the queries, including the source, target,
and node index fields, are copied into the arc data and node
data of the resulting vtkGraph. If the node query is not
given, the node data will contain a single "id" column with
the same type as the source/target id arrays.
If parallel arcs are collected, not all the arc data is not
copied into the output. Only the source and target id arrays
will be transferred. An additional vtkIdTypeArray column
called "weight" is created which contains the number of
times each arc appeared in the input.
If the node query contains positional data, the user may
specify the names of these fields. These arrays must be data
arrays. The z-coordinate array is optional, and if not given
the z-coordinates are set to zero.
To create an instance of class vtkSQLGraphReader, simply
invoke its constructor as follows
obj = vtkSQLGraphReader
Methods
The class vtkSQLGraphReader 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 vtkSQLGraphReader class.
* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkSQLGraphReader = obj.NewInstance ()
* vtkSQLGraphReader = obj.SafeDownCast (vtkObject o)
* 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.SetVertexQuery (vtkSQLQuery q) - The query that
retrieves the node information.
* vtkSQLQuery = obj.GetVertexQuery () - The query that
retrieves the node information.
* obj.SetEdgeQuery (vtkSQLQuery q) - The query that
retrieves the arc information.
* vtkSQLQuery = obj.GetEdgeQuery () - The query that
retrieves the arc information.
* obj.SetSourceField (string ) - The name of the field in
the arc query for the source node of each arc.
* string = obj.GetSourceField () - The name of the field in
the arc query for the source node of each arc.
* obj.SetTargetField (string ) - The name of the field in
the arc query for the target node of each arc.
* string = obj.GetTargetField () - The name of the field in
the arc query for the target node of each arc.
* obj.SetVertexIdField (string ) - The name of the field in
the node query for the node ID.
* string = obj.GetVertexIdField () - The name of the field
in the node query for the node ID.
* obj.SetXField (string ) - The name of the field in the
node query for the node's x coordinate.
* string = obj.GetXField () - The name of the field in the
node query for the node's x coordinate.
* obj.SetYField (string ) - The name of the field in the
node query for the node's y coordinate.
* string = obj.GetYField () - The name of the field in the
node query for the node's y coordinate.
* obj.SetZField (string ) - The name of the field in the
node query for the node's z coordinate.
* string = obj.GetZField () - The name of the field in the
node query for the node's z coordinate.
* obj.SetCollapseEdges (bool ) - When set, creates a graph
with no parallel arcs. Parallel arcs are combined into one
arc. No cell fields are passed to the output, except the
vtkGhostLevels array if it exists, but a new field
"weight" is created that holds the number of duplicates of
that arc in the input.
* bool = obj.GetCollapseEdges () - When set, creates a graph
with no parallel arcs. Parallel arcs are combined into one
arc. No cell fields are passed to the output, except the
vtkGhostLevels array if it exists, but a new field
"weight" is created that holds the number of duplicates of
that arc in the input.
* obj.CollapseEdgesOn () - When set, creates a graph with no
parallel arcs. Parallel arcs are combined into one arc. No
cell fields are passed to the output, except the
vtkGhostLevels array if it exists, but a new field
"weight" is created that holds the number of duplicates of
that arc in the input.
* obj.CollapseEdgesOff () - When set, creates a graph with
no parallel arcs. Parallel arcs are combined into one arc.
No cell fields are passed to the output, except the
vtkGhostLevels array if it exists, but a new field
"weight" is created that holds the number of duplicates of
that arc in the input.
* FreeMat_Documentation
* Visualization_Toolkit_Infovis_Classes
* Generated on Thu Jul 25 2013 17:18:34 for FreeMat by
doxygen_ 1.8.1.1
|