BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
bdm::MappedDataArray< TScalar, TClass, TDataMember > Class Template Reference

#include <mapped_data_array.h>

Inheritance diagram for bdm::MappedDataArray< TScalar, TClass, TDataMember >:
[legend]
Collaboration diagram for bdm::MappedDataArray< TScalar, TClass, TDataMember >:
[legend]

Public Types

typedef Superclass::ValueType ValueType
 

Public Member Functions

 vtkAbstractTemplateTypeMacro (MappedDataArray, vtkMappedDataArray< TScalar >) vtkMappedDataArrayNewInstanceMacro(MappedDataArray) static MappedDataArray *New()
 
void Initialize (Param::MappedDataArrayMode mode, const std::string &name, uint64_t num_components, uint64_t dm_offset)
 
void Update (const std::vector< Agent * > *agents, uint64_t start, uint64_t end) final
 
void PrintSelf (ostream &os, vtkIndent indent) final
 
void Initialize () final
 
void GetTuples (vtkIdList *pt_ids, vtkAbstractArray *output) final
 
void GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) final
 
void Squeeze () final
 
vtkArrayIterator * NewIterator () final
 
vtkIdType LookupValue (vtkVariant value) final
 
void LookupValue (vtkVariant value, vtkIdList *ids) final
 
vtkVariant GetVariantValue (vtkIdType idx) final
 
void ClearLookup () final
 
double * GetTuple (vtkIdType i) final
 
void GetTuple (vtkIdType i, double *tuple) final
 
vtkIdType LookupTypedValue (TScalar value) final
 
void LookupTypedValue (TScalar value, vtkIdList *ids) final
 
ValueType GetValue (vtkIdType idx) const final
 
TScalar & GetValueReference (vtkIdType idx) final
 
void GetTypedTuple (vtkIdType idx, TScalar *t) const final
 
int Allocate (vtkIdType sz, vtkIdType ext) final
 
int Resize (vtkIdType num_tuples) final
 
void SetNumberOfTuples (vtkIdType number) final
 
void SetTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) final
 
void SetTuple (vtkIdType i, const float *source) final
 
void SetTuple (vtkIdType i, const double *source) final
 
void InsertTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) final
 
void InsertTuple (vtkIdType i, const float *source) final
 
void InsertTuple (vtkIdType i, const double *source) final
 
void InsertTuples (vtkIdList *dst_ids, vtkIdList *src_ids, vtkAbstractArray *source) final
 
void InsertTuples (vtkIdType dst_start, vtkIdType n, vtkIdType src_start, vtkAbstractArray *source) final
 
vtkIdType InsertNextTuple (vtkIdType j, vtkAbstractArray *source) final
 
vtkIdType InsertNextTuple (const float *source) final
 
vtkIdType InsertNextTuple (const double *source) final
 
void DeepCopy (vtkAbstractArray *aa) final
 
void DeepCopy (vtkDataArray *da) final
 
void InterpolateTuple (vtkIdType i, vtkIdList *pt_indices, vtkAbstractArray *source, double *weights) final
 
void InterpolateTuple (vtkIdType i, vtkIdType id1, vtkAbstractArray *source1, vtkIdType id2, vtkAbstractArray *source2, double t) final
 
void SetVariantValue (vtkIdType idx, vtkVariant value) final
 
void InsertVariantValue (vtkIdType idx, vtkVariant value) final
 
void RemoveTuple (vtkIdType id) final
 
void RemoveFirstTuple () final
 
void RemoveLastTuple () final
 
void SetTypedTuple (vtkIdType i, const TScalar *t) final
 
void InsertTypedTuple (vtkIdType i, const TScalar *t) final
 
vtkIdType InsertNextTypedTuple (const TScalar *t) final
 
void SetValue (vtkIdType idx, TScalar value) final
 
vtkIdType InsertNextValue (TScalar v) final
 
void InsertValue (vtkIdType idx, TScalar v) final
 
- Public Member Functions inherited from bdm::MappedDataArrayInterface
 MappedDataArrayInterface ()=default
 
virtual ~MappedDataArrayInterface ()=default
 

Protected Member Functions

 MappedDataArray ()
 
 ~MappedDataArray () override
 

Protected Attributes

GetDataMemberForVis< TScalar *, TClass, TDataMember > get_dm_
 Access agent data member functor. More...
 
const std::vector< Agent * > * agents_ = nullptr
 
uint64_t start_ = 0
 
uint64_t end_ = 0
 
double * temp_array_ = nullptr
 
Param::MappedDataArrayMode mode_
 
uint64_t match_value_ = 0
 
std::vector< uint64_t > is_matching_
 
std::vector< TScalar > data_
 If mode_ is kCopy or kCache, data from Agents is written to data_. More...
 

Private Member Functions

 MappedDataArray (const MappedDataArray &)=delete
 
void operator= (const MappedDataArray &)=delete
 
vtkIdType Lookup (const TScalar &val, vtkIdType start_index)
 

Detailed Description

template<typename TScalar, typename TClass, typename TDataMember>
class bdm::MappedDataArray< TScalar, TClass, TDataMember >

Definition at line 128 of file mapped_data_array.h.

Member Typedef Documentation

◆ ValueType

template<typename TScalar , typename TClass , typename TDataMember >
typedef Superclass::ValueType bdm::MappedDataArray< TScalar, TClass, TDataMember >::ValueType

Definition at line 134 of file mapped_data_array.h.

Constructor & Destructor Documentation

◆ MappedDataArray() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
bdm::MappedDataArray< TScalar, TClass, TDataMember >::MappedDataArray
protected

Definition at line 786 of file mapped_data_array.h.

◆ ~MappedDataArray()

template<typename TScalar , typename TClass , typename TDataMember >
bdm::MappedDataArray< TScalar, TClass, TDataMember >::~MappedDataArray
overrideprotected

Definition at line 792 of file mapped_data_array.h.

◆ MappedDataArray() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
bdm::MappedDataArray< TScalar, TClass, TDataMember >::MappedDataArray ( const MappedDataArray< TScalar, TClass, TDataMember > &  )
privatedelete

Member Function Documentation

◆ Allocate()

template<typename TScalar , typename TClass , typename TDataMember >
int bdm::MappedDataArray< TScalar, TClass, TDataMember >::Allocate ( vtkIdType  sz,
vtkIdType  ext 
)
final

Definition at line 558 of file mapped_data_array.h.

◆ ClearLookup()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::ClearLookup
final

Definition at line 406 of file mapped_data_array.h.

◆ DeepCopy() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::DeepCopy ( vtkAbstractArray *  aa)
final

Definition at line 669 of file mapped_data_array.h.

◆ DeepCopy() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::DeepCopy ( vtkDataArray *  da)
final

Definition at line 677 of file mapped_data_array.h.

◆ GetTuple() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
double * bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetTuple ( vtkIdType  i)
final

Definition at line 412 of file mapped_data_array.h.

◆ GetTuple() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetTuple ( vtkIdType  i,
double *  tuple 
)
final

Definition at line 419 of file mapped_data_array.h.

◆ GetTuples() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetTuples ( vtkIdList *  pt_ids,
vtkAbstractArray *  output 
)
final

Definition at line 319 of file mapped_data_array.h.

◆ GetTuples() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetTuples ( vtkIdType  p1,
vtkIdType  p2,
vtkAbstractArray *  output 
)
final

Definition at line 339 of file mapped_data_array.h.

◆ GetTypedTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetTypedTuple ( vtkIdType  idx,
TScalar *  t 
) const
final

Definition at line 547 of file mapped_data_array.h.

◆ GetValue()

template<typename TScalar , typename TClass , typename TDataMember >
MappedDataArray< TScalar, TClass, TDataMember >::ValueType bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetValue ( vtkIdType  idx) const
final

Definition at line 481 of file mapped_data_array.h.

◆ GetValueReference()

template<typename TScalar , typename TClass , typename TDataMember >
TScalar & bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetValueReference ( vtkIdType  idx)
final

Definition at line 515 of file mapped_data_array.h.

◆ GetVariantValue()

template<typename TScalar , typename TClass , typename TDataMember >
vtkVariant bdm::MappedDataArray< TScalar, TClass, TDataMember >::GetVariantValue ( vtkIdType  idx)
final

Definition at line 399 of file mapped_data_array.h.

◆ Initialize() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::Initialize
final

Definition at line 311 of file mapped_data_array.h.

◆ Initialize() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::Initialize ( Param::MappedDataArrayMode  mode,
const std::string &  name,
uint64_t  num_components,
uint64_t  dm_offset 
)

Definition at line 230 of file mapped_data_array.h.

◆ InsertNextTuple() [1/3]

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertNextTuple ( const double *  source)
final

Definition at line 661 of file mapped_data_array.h.

◆ InsertNextTuple() [2/3]

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertNextTuple ( const float *  source)
final

Definition at line 653 of file mapped_data_array.h.

◆ InsertNextTuple() [3/3]

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertNextTuple ( vtkIdType  j,
vtkAbstractArray *  source 
)
final

Definition at line 645 of file mapped_data_array.h.

◆ InsertNextTypedTuple()

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertNextTypedTuple ( const TScalar *  t)
final

Definition at line 754 of file mapped_data_array.h.

◆ InsertNextValue()

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertNextValue ( TScalar  v)
final

Definition at line 770 of file mapped_data_array.h.

◆ InsertTuple() [1/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTuple ( vtkIdType  i,
const double *  source 
)
final

Definition at line 621 of file mapped_data_array.h.

◆ InsertTuple() [2/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTuple ( vtkIdType  i,
const float *  source 
)
final

Definition at line 613 of file mapped_data_array.h.

◆ InsertTuple() [3/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTuple ( vtkIdType  i,
vtkIdType  j,
vtkAbstractArray *  source 
)
final

Definition at line 605 of file mapped_data_array.h.

◆ InsertTuples() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTuples ( vtkIdList *  dst_ids,
vtkIdList *  src_ids,
vtkAbstractArray *  source 
)
final

Definition at line 629 of file mapped_data_array.h.

◆ InsertTuples() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTuples ( vtkIdType  dst_start,
vtkIdType  n,
vtkIdType  src_start,
vtkAbstractArray *  source 
)
final

Definition at line 637 of file mapped_data_array.h.

◆ InsertTypedTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertTypedTuple ( vtkIdType  i,
const TScalar *  t 
)
final

Definition at line 746 of file mapped_data_array.h.

◆ InsertValue()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertValue ( vtkIdType  idx,
TScalar  v 
)
final

Definition at line 778 of file mapped_data_array.h.

◆ InsertVariantValue()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InsertVariantValue ( vtkIdType  idx,
vtkVariant  value 
)
final

Definition at line 709 of file mapped_data_array.h.

◆ InterpolateTuple() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InterpolateTuple ( vtkIdType  i,
vtkIdList *  pt_indices,
vtkAbstractArray *  source,
double *  weights 
)
final

Definition at line 684 of file mapped_data_array.h.

◆ InterpolateTuple() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::InterpolateTuple ( vtkIdType  i,
vtkIdType  id1,
vtkAbstractArray *  source1,
vtkIdType  id2,
vtkAbstractArray *  source2,
double  t 
)
final

Definition at line 692 of file mapped_data_array.h.

◆ Lookup()

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::Lookup ( const TScalar &  val,
vtkIdType  start_index 
)
private

Definition at line 798 of file mapped_data_array.h.

◆ LookupTypedValue() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::LookupTypedValue ( TScalar  value)
final

Definition at line 462 of file mapped_data_array.h.

◆ LookupTypedValue() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::LookupTypedValue ( TScalar  value,
vtkIdList *  ids 
)
final

Definition at line 469 of file mapped_data_array.h.

◆ LookupValue() [1/2]

template<typename TScalar , typename TClass , typename TDataMember >
vtkIdType bdm::MappedDataArray< TScalar, TClass, TDataMember >::LookupValue ( vtkVariant  value)
final

Definition at line 372 of file mapped_data_array.h.

◆ LookupValue() [2/2]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::LookupValue ( vtkVariant  value,
vtkIdList *  ids 
)
final

Definition at line 384 of file mapped_data_array.h.

◆ NewIterator()

template<typename TScalar , typename TClass , typename TDataMember >
vtkArrayIterator * bdm::MappedDataArray< TScalar, TClass, TDataMember >::NewIterator
final

Definition at line 365 of file mapped_data_array.h.

◆ operator=()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::operator= ( const MappedDataArray< TScalar, TClass, TDataMember > &  )
privatedelete

◆ PrintSelf()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
final

Definition at line 294 of file mapped_data_array.h.

◆ RemoveFirstTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::RemoveFirstTuple
final

Definition at line 724 of file mapped_data_array.h.

◆ RemoveLastTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::RemoveLastTuple
final

Definition at line 731 of file mapped_data_array.h.

◆ RemoveTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::RemoveTuple ( vtkIdType  id)
final

Definition at line 717 of file mapped_data_array.h.

◆ Resize()

template<typename TScalar , typename TClass , typename TDataMember >
int bdm::MappedDataArray< TScalar, TClass, TDataMember >::Resize ( vtkIdType  num_tuples)
final

Definition at line 566 of file mapped_data_array.h.

◆ SetNumberOfTuples()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetNumberOfTuples ( vtkIdType  number)
final

Definition at line 573 of file mapped_data_array.h.

◆ SetTuple() [1/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetTuple ( vtkIdType  i,
const double *  source 
)
final

Definition at line 597 of file mapped_data_array.h.

◆ SetTuple() [2/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetTuple ( vtkIdType  i,
const float *  source 
)
final

Definition at line 589 of file mapped_data_array.h.

◆ SetTuple() [3/3]

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetTuple ( vtkIdType  i,
vtkIdType  j,
vtkAbstractArray *  source 
)
final

Definition at line 581 of file mapped_data_array.h.

◆ SetTypedTuple()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetTypedTuple ( vtkIdType  i,
const TScalar *  t 
)
final

Definition at line 738 of file mapped_data_array.h.

◆ SetValue()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetValue ( vtkIdType  idx,
TScalar  value 
)
final

Definition at line 762 of file mapped_data_array.h.

◆ SetVariantValue()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::SetVariantValue ( vtkIdType  idx,
vtkVariant  value 
)
final

Definition at line 701 of file mapped_data_array.h.

◆ Squeeze()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::Squeeze
final

Definition at line 359 of file mapped_data_array.h.

◆ Update()

template<typename TScalar , typename TClass , typename TDataMember >
void bdm::MappedDataArray< TScalar, TClass, TDataMember >::Update ( const std::vector< Agent * > *  agents,
uint64_t  start,
uint64_t  end 
)
finalvirtual

Implements bdm::MappedDataArrayInterface.

Definition at line 240 of file mapped_data_array.h.

◆ vtkAbstractTemplateTypeMacro()

template<typename TScalar , typename TClass , typename TDataMember >
bdm::MappedDataArray< TScalar, TClass, TDataMember >::vtkAbstractTemplateTypeMacro ( MappedDataArray< TScalar, TClass, TDataMember >  ,
vtkMappedDataArray< TScalar >   
)

Member Data Documentation

◆ agents_

template<typename TScalar , typename TClass , typename TDataMember >
const std::vector<Agent*>* bdm::MappedDataArray< TScalar, TClass, TDataMember >::agents_ = nullptr
protected

Definition at line 204 of file mapped_data_array.h.

◆ data_

template<typename TScalar , typename TClass , typename TDataMember >
std::vector<TScalar> bdm::MappedDataArray< TScalar, TClass, TDataMember >::data_
mutableprotected

If mode_ is kCopy or kCache, data from Agents is written to data_.

Definition at line 218 of file mapped_data_array.h.

◆ end_

template<typename TScalar , typename TClass , typename TDataMember >
uint64_t bdm::MappedDataArray< TScalar, TClass, TDataMember >::end_ = 0
protected

Definition at line 206 of file mapped_data_array.h.

◆ get_dm_

template<typename TScalar , typename TClass , typename TDataMember >
GetDataMemberForVis<TScalar*, TClass, TDataMember> bdm::MappedDataArray< TScalar, TClass, TDataMember >::get_dm_
protected

Access agent data member functor.

Definition at line 203 of file mapped_data_array.h.

◆ is_matching_

template<typename TScalar , typename TClass , typename TDataMember >
std::vector<uint64_t> bdm::MappedDataArray< TScalar, TClass, TDataMember >::is_matching_
mutableprotected

Stores match_value at the time the data element was cached. Data is valid for one iteration, i.e. as long as match_value_ doesn't change.

Definition at line 216 of file mapped_data_array.h.

◆ match_value_

template<typename TScalar , typename TClass , typename TDataMember >
uint64_t bdm::MappedDataArray< TScalar, TClass, TDataMember >::match_value_ = 0
mutableprotected

Comparison value to determine if cached data is valid This value is increemented at each simulation iteration.

Definition at line 212 of file mapped_data_array.h.

◆ mode_

template<typename TScalar , typename TClass , typename TDataMember >
Param::MappedDataArrayMode bdm::MappedDataArray< TScalar, TClass, TDataMember >::mode_
protected

Definition at line 209 of file mapped_data_array.h.

◆ start_

template<typename TScalar , typename TClass , typename TDataMember >
uint64_t bdm::MappedDataArray< TScalar, TClass, TDataMember >::start_ = 0
protected

Definition at line 205 of file mapped_data_array.h.

◆ temp_array_

template<typename TScalar , typename TClass , typename TDataMember >
double* bdm::MappedDataArray< TScalar, TClass, TDataMember >::temp_array_ = nullptr
protected

Definition at line 207 of file mapped_data_array.h.


The documentation for this class was generated from the following file: