31 #include "vtkCommonCoreModule.h"
34 class vtkBitArrayLookup;
52 void Initialize() VTK_OVERRIDE;
55 int GetDataType() VTK_OVERRIDE {
return VTK_BIT;}
147 void RemoveLastTuple() VTK_OVERRIDE;
156 void SetComponent(
vtkIdType i,
int j,
double c) VTK_OVERRIDE;
161 void Squeeze() VTK_OVERRIDE;
180 void SetNumberOfValues(
vtkIdType number) VTK_OVERRIDE;
209 void InsertComponent(
vtkIdType i,
int j,
double c) VTK_OVERRIDE;
215 {
return this->Array +
id/8; }
226 return this->WritePointer(
id, number);
231 return static_cast<void *
>(this->GetPointer(
id));
256 this->SetArray(
static_cast<unsigned char *
>(array),
size,
save);
259 int vtkNotUsed(deleteMethod)) VTK_OVERRIDE
261 this->SetArray(
static_cast<unsigned char *
>(array),
size,
save);
288 void DataChanged() VTK_OVERRIDE;
295 void ClearLookup() VTK_OVERRIDE;
301 unsigned char *Array;
316 void operator=(
const vtkBitArray&) VTK_DELETE_FUNCTION;
318 vtkBitArrayLookup* Lookup;
326 this->
MaxId = number - 1;
334 this->
Array[
id/8] =
static_cast<unsigned char>(
335 this->
Array[
id/8] | (0x80 >>
id%8));
339 this->
Array[
id/8] =
static_cast<unsigned char>(
340 this->
Array[
id/8] & (~(0x80 >>
id%8)));
347 if (
id >= this->
Size )
356 this->
Array[
id/8] =
static_cast<unsigned char>(
357 this->
Array[
id/8] | (0x80 >>
id%8));
361 this->
Array[
id/8] =
static_cast<unsigned char>(
362 this->
Array[
id/8] & (~(0x80 >>
id%8)));
364 if (
id > this->
MaxId )
Abstract superclass for all arrays.
virtual void DeepCopy(vtkAbstractArray *da)
Deep copy of data.
Abstract superclass to iterate over elements in an vtkAbstractArray.
dynamic, self-adjusting array of bits
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) override
Insert the jth tuple in the source array, at the end in this array.
vtkIdType InsertNextTuple(const double *tuple) override
void DataChanged() override
Tell the array explicitly that the data has changed.
double * GetTuple(vtkIdType i) override
Get a pointer to a tuple at the ith location.
void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override
Copy n consecutive tuples starting at srcStart from the source array to this array,...
void SetNumberOfTuples(vtkIdType number) override
Set the number of n-tuples in the array.
void SetVariantValue(vtkIdType idx, vtkVariant value) override
Set a value in the array from a variant.
int GetDataTypeSize() override
Return the size of the underlying data type.
void SetValue(vtkIdType id, int value)
Set the data at a particular index.
void InsertTuple(vtkIdType i, const double *tuple) override
void GetTuple(vtkIdType i, double *tuple) override
Copy the tuple value into a user-provided array.
void SetTuple(vtkIdType i, const double *tuple) override
unsigned char * ResizeAndExtend(vtkIdType sz)
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
void SetTuple(vtkIdType i, const float *tuple) override
Set the tuple value at the ith location in the array.
vtkIdType InsertNextTuple(const float *tuple) override
Insert (memory allocation performed) the tuple onto the end of the array.
void InsertValue(vtkIdType id, int i)
Inserts values and checks to make sure there is enough memory.
void RemoveFirstTuple() override
void InsertTuple(vtkIdType i, const float *tuple) override
Insert (memory allocation performed) the tuple into the ith location in the array.
VTK_NEWINSTANCE vtkArrayIterator * NewIterator() override
Returns a new vtkBitArrayIterator instance.
void SetNumberOfValues(vtkIdType number) override
Fast method based setting of values without memory checks.
int Allocate(vtkIdType sz, vtkIdType ext=1000) override
Allocate memory for this array.
void SetVoidArray(void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod)) override
unsigned char * WritePointer(vtkIdType id, vtkIdType number)
Get the address of a particular data index.
vtkIdType InsertNextValue(int i)
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
Insert the jth tuple in the source array, at ith location in this array.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetVoidArray(void *array, vtkIdType size, int save) override
void RemoveTuple(vtkIdType id) override
These methods remove tuples from the data array.
void * GetVoidPointer(vtkIdType id) override
Return a void pointer.
void * WriteVoidPointer(vtkIdType id, vtkIdType number) override
Get the address of a particular data index.
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
Set the tuple at the ith location using the jth tuple in the source array.
void DeepCopy(vtkDataArray *da) override
Deep copy of another bit array.
void SetArray(unsigned char *array, vtkIdType size, int save)
This method lets the user specify data to be held by the array.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
Inserts values from a variant and checks to ensure there is enough memory.
void Squeeze() override
Free any unneeded memory.
static vtkBitArray * New()
abstract superclass for arrays of numeric data
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
list of point or cell ids
a simple class to control print indentation
A atomic type representing the union of many types.
int ToInt(bool *valid) const
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))