File: vtkarray.mdc

package info (click to toggle)
freemat 4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 141,800 kB
  • ctags: 14,082
  • sloc: ansic: 126,788; cpp: 62,046; python: 2,080; perl: 1,255; sh: 1,146; yacc: 1,019; lex: 239; makefile: 100
file content (109 lines) | stat: -rw-r--r-- 4,849 bytes parent folder | download | duplicates (2)
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

 Usage

vtkArray is the root of a hierarchy of arrays that can be
used to store data with any number of dimensions. It
provides an abstract interface for retrieving and setting
array attributes that are independent of the type of values
stored in the array - such as the number of dimensions,
extents along each dimension, and number of values stored in
the array.
To get and set array values, the vtkTypedArray template
class derives from vtkArray and provides type-specific
methods for retrieval and update.
Two concrete derivatives of vtkTypedArray are provided at
the moment: vtkDenseArray and vtkSparseArray, which provide
dense and sparse storage for arbitrary-dimension data,
respectively. Toolkit users can create their own concrete
derivatives that implement alternative storage strategies,
such as compressed-sparse-row, etc. You could also create an
array that provided read-only access to 'virtual' data, such
as an array that returned a Fibonacci sequence, etc.
To create an instance of class vtkArray, simply invoke its
constructor as follows

    obj = vtkArray



 Methods

The class vtkArray 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 vtkArray class.

* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkArray = obj.NewInstance ()
* vtkArray = obj.SafeDownCast (vtkObject o)
* bool = obj.IsDense () - Returns true iff the underlying
  array storage is "dense", i.e. that GetSize() and
  GetNonNullSize() will always return the same value. If
  not, the array is "sparse".
* obj.Resize (vtkIdType i) - Resizes the array to the given
  extents (number of dimensions and size of each dimension).
  Note that concrete implementations of vtkArray may place
  constraints on the the extents that they will store, so
  you cannot assume that GetExtents() will always return the
  same value passed to Resize().
  The contents of the array are undefined after calling
  Resize() - you should initialize its contents accordingly.
  In particular, dimension-labels will be undefined, dense
  array values will be undefined, and sparse arrays will be
  empty.
* obj.Resize (vtkIdType i, vtkIdType j) - Resizes the array
  to the given extents (number of dimensions and size of
  each dimension). Note that concrete implementations of
  vtkArray may place constraints on the the extents that
  they will store, so you cannot assume that GetExtents()
  will always return the same value passed to Resize().
  The contents of the array are undefined after calling
  Resize() - you should initialize its contents accordingly.
  In particular, dimension-labels will be undefined, dense
  array values will be undefined, and sparse arrays will be
  empty.
* obj.Resize (vtkIdType i, vtkIdType j, vtkIdType k) -
  Resizes the array to the given extents (number of
  dimensions and size of each dimension). Note that concrete
  implementations of vtkArray may place constraints on the
  the extents that they will store, so you cannot assume
  that GetExtents() will always return the same value passed
  to Resize().
  The contents of the array are undefined after calling
  Resize() - you should initialize its contents accordingly.
  In particular, dimension-labels will be undefined, dense
  array values will be undefined, and sparse arrays will be
  empty.
* vtkIdType = obj.GetDimensions () - Returns the number of
  dimensions stored in the array. Note that this is the same
  as calling GetExtents().GetDimensions().
* vtkIdType = obj.GetSize () - Returns the number of values
  stored in the array. Note that this is the same as calling
  GetExtents().GetSize(), and represents the maximum number
  of values that could ever be stored using the current
  extents. This is equal to the number of values stored in a
  dense array, but may be larger than the number of values
  stored in a sparse array.
* vtkIdType = obj.GetNonNullSize () - Returns the number of
  non-null values stored in the array. Note that this value
  will equal GetSize() for dense arrays, and will be less-
  than-or-equal to GetSize() for sparse arrays.
* obj.SetName (vtkStdString &name) - Sets the array
  name.
* vtkStdString = obj.GetName () - Returns the array name.
* obj.SetDimensionLabel (vtkIdType i, vtkStdString
  &label) - Sets the label for the i-th array dimension.
* vtkStdString = obj.GetDimensionLabel (vtkIdType i) -
  Returns the label for the i-th array dimension.
* vtkArray = obj.DeepCopy () - Returns a new array that is a
  deep copy of this array.


* FreeMat_Documentation
* Visualization_Toolkit_Common_Classes
* Generated on Thu Jul 25 2013 17:18:30 for FreeMat by
  doxygen_ 1.8.1.1