Go to the documentation of this file.
31 #include "vtkCommonCoreModule.h"
34 class vtkBitArrayLookup;
223 {
return this->Array +
id/8; }
234 return this->WritePointer(
id, number);
239 return static_cast<void *
>(this->GetPointer(
id));
266 this->SetArray(
static_cast<unsigned char *
>(array),
size,
save);
270 this->SetArray(
static_cast<unsigned char *
>(array),
size,
save, deleteMethod);
325 void (*DeleteFunction)(
void*);
335 vtkBitArrayLookup* Lookup;
343 this->
MaxId = number - 1;
351 this->
Array[
id/8] =
static_cast<unsigned char>(
352 this->
Array[
id/8] | (0x80 >>
id%8));
356 this->
Array[
id/8] =
static_cast<unsigned char>(
357 this->
Array[
id/8] & (~(0x80 >>
id%8)));
364 if (
id >= this->
Size )
373 this->
Array[
id/8] =
static_cast<unsigned char>(
374 this->
Array[
id/8] | (0x80 >>
id%8));
378 this->
Array[
id/8] =
static_cast<unsigned char>(
379 this->
Array[
id/8] & (~(0x80 >>
id%8)));
381 if (
id > this->
MaxId )
void SetVoidArray(void *array, vtkIdType size, int save) override
virtual void Squeeze()=0
Free any unnecessary memory.
void RemoveFirstTuple() override
@ VTK_DATA_ARRAY_ALIGNED_FREE
void SetArrayFreeFunction(void(*callback)(void *)) override
This method allows the user to specify a custom free function to be called when the array is dealloca...
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 SetComponent(vtkIdType i, int j, double c) override
Set the data component at the ith tuple and jth component location.
void Squeeze() override
Free any unneeded memory.
void SetNumberOfValues(vtkIdType number) override
Fast method based setting of values without memory checks.
void SetArray(unsigned char *array, vtkIdType size, int save, int deleteMethod=VTK_DATA_ARRAY_DELETE)
This method lets the user specify data to be held by the array.
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
void SetTuple(vtkIdType i, const double *tuple) override
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) override
Insert the jth tuple in the source array, at the end in this array.
abstract superclass for arrays of numeric data
unsigned char * GetPointer(vtkIdType id)
Direct manipulation of the underlying data.
void LookupValue(vtkVariant value, vtkIdList *ids) override
double * GetTuple(vtkIdType i) override
Get a pointer to a tuple at the ith location.
unsigned char * WritePointer(vtkIdType id, vtkIdType number)
Get the address of a particular data index.
virtual void InsertVariantValue(vtkIdType valueIdx, vtkVariant value)=0
Insert a value into the array from a variant.
void DeepCopy(vtkDataArray *da) override
Deep copy of another bit array.
vtkIdType LookupValue(vtkVariant value) override
Return the indices where a specific value appears.
int GetDataTypeSize() override
Return the size of the underlying data type.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
void InsertValue(vtkIdType id, int i)
Inserts values and checks to make sure there is enough memory.
void DataChanged() override
Tell the array explicitly that the data has changed.
int GetDataType() override
Return the underlying data type.
void SetValue(vtkIdType id, int value)
Set the data at a particular index.
void SetNumberOfTuples(vtkIdType number) override
Set the number of n-tuples in the array.
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
Insert the jth tuple in the source array, at ith location in this array.
static vtkBitArray * New()
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
Inserts values from a variant and checks to ensure there is enough memory.
void InsertTuple(vtkIdType i, const double *tuple) override
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,...
@ VTK_DATA_ARRAY_USER_DEFINED
a simple class to control print indentation
void * GetVoidPointer(vtkIdType id) override
Return a void pointer.
A atomic type representing the union of many types.
list of point or cell ids
vtkTypeBool Resize(vtkIdType numTuples) override
Resize the array while conserving the data.
void * WriteVoidPointer(vtkIdType id, vtkIdType number) override
Get the address of a particular data index.
vtkIdType InsertNextValue(int i)
unsigned char * ResizeAndExtend(vtkIdType sz)
virtual void SetVariantValue(vtkIdType valueIdx, vtkVariant value)=0
Set a value in the array from a variant.
void SetVoidArray(void *array, vtkIdType size, int save, int deleteMethod) override
void InsertComponent(vtkIdType i, int j, double c) override
Insert the data component at ith tuple and jth component location.
void InsertTuple(vtkIdType i, const float *tuple) override
Insert (memory allocation performed) the tuple into the ith location in the array.
Abstract superclass for all arrays.
void RemoveTuple(vtkIdType id) override
These methods remove tuples from the data array.
int GetValue(vtkIdType id)
Get the data at a particular index.
vtkIdType LookupValue(int value)
int ToInt(bool *valid) const
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000) override
Allocate memory for this array.
virtual void DeepCopy(vtkAbstractArray *da)
Deep copy of data.
Abstract superclass to iterate over elements in an vtkAbstractArray.
void LookupValue(int value, vtkIdList *ids)
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
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 ClearLookup() override
Delete the associated fast lookup data structure on this array, if it exists.
void GetTuple(vtkIdType i, double *tuple) override
Copy the tuple value into a user-provided array.
dynamic, self-adjusting array of bits
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType InsertNextTuple(const float *tuple) override
Insert (memory allocation performed) the tuple onto the end of the array.
void SetTuple(vtkIdType i, const float *tuple) override
Set the tuple value at the ith location in the array.
void DeepCopy(vtkAbstractArray *aa) override
Deep copy of data.
vtkIdType InsertNextTuple(const double *tuple) override
vtkArrayIterator * NewIterator() override
Returns a new vtkBitArrayIterator instance.
void Initialize() override
Release storage and reset array to initial state.
void SetVariantValue(vtkIdType idx, vtkVariant value) override
Set a value in the array from a variant.
virtual void SetNumberOfValues(vtkIdType numValues)
Specify the number of values (tuples * components) for this object to hold.
void RemoveLastTuple() override