|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A Skeleton is a set of Representation object, each of them accessed by an Representer object. More...
#include <Skeleton.hpp>
Public Types | |
| using | FieldIterator_t = Representation::const_iterator_t |
| using | SkeletonExcluder = unordered_set< size_t > |
| To avoid recursion where a skeleton would inspect itself during recursive field iteration, remember the ObjectCountID of the used skeletons. | |
| using | RepresentationFieldIterator_t = std::function< bool(const Representer &theRepresenter, const Representation &R, const FieldID &, const Field &)> |
Public Types inherited from Fiber::OwnerBase | |
| template<class ItemType > | |
| using | Item = MemCore::InterfaceData< ItemType > |
| An optional convenience class that allows to easily add arbitrary types to Intercubes . | |
Public Member Functions | |
| Skeleton ()=delete | |
| prevent default construction | |
| Skeleton (const Skeleton &)=delete | |
| prevent copy construction | |
| void | operator= (const Skeleton &)=delete |
| prevent copy assignment | |
| void | clear () |
| void | extremeUnction () override |
| Representation & | operator[] (const Representer &D) |
| RefPtr< Representation > | makeRepresentation (const Representer &D) |
| Representation & | operator[] (const BaseSpace &D) |
| int | Dims () const override |
| The topological dimensionality of this Skeleton. | |
| RefPtr< Field > | createIndirectedField (const Representer &WantRep, const RefPtr< Field > &RelativeIndices, const string &FieldName, const RefPtr< Field > &SourceField, const RefPtr< Field > &SourcePositions) |
| RefPtr< Field > | getField (const Representer &R, const RefPtr< FieldID > &Fid, const RefPtr< Atlas > &myAtlas=nullptr, const RepresenterList_t &SkipRepresenters={}) |
| Get a field relative to the specified representer. | |
| RefPtr< Field > | getField (const Representer &R, const std::string &FieldName, const RefPtr< Atlas > &myAtlas=nullptr, const RepresenterList_t &SkipRepresenters={}) |
| Get a field relative to the specified representer. | |
| RefPtr< Field > | getPositions (const Representer &R) |
| Get the positions field in the given representation. | |
| std::string | xml () const override |
| std::string | Name () const override |
| unsigned | iterate_fields (const FieldIterator_t &F, SkeletonExcluder &SE) const |
| unsigned | iterate_fields (const FieldIterator_t &F) const |
| Iterate over all fields on all Representations of this Skeleton. | |
| unsigned | iterate_fields (const RepresentationFieldIterator_t &F, SkeletonExcluder &SE) const |
| unsigned | iterate_fields (const RepresentationFieldIterator_t &F) const |
| Iterate over all fields on all Representations of this Skeleton, also providing information on the Representation and Representer (e.g. | |
| template<is_field_identifier... FieldIdentifiers> | |
| auto | getFields (const Representer &R, FieldIdentifiers... theFieldIdentifiers) |
| Get a number of fields at once from a Skeleton and a Representer such as a chart object: | |
| template<is_field_identifier... FieldIdentifiers> | |
| auto | getFieldFragmentCreators (const Representer &R, const RefPtr< FragmentID > &fID, FieldIdentifiers... theFieldIdentifiers) |
| Get a set of array creators at once from a Skeleton and a Representer such as a chart object, all for the same fragment as specified by the fragment ID (which is a nullptr for an unfragmented field): | |
| int | size () const |
| Return the number of representations available here. | |
| int | iterate (ConstIterator &) const |
| Inspect all elements of this map. | |
| int | iterate (Iterator &) |
| Iterate over all elements of this map. | |
| int | iterate (const std::function< bool(const Representer &, const Representation &)> &F) const |
| Immutable iteration via std::function. | |
| int | iterate (const std::function< bool(const Representer &, Representation &)> &F) |
| Mutable iteration via std::function. | |
| RefPtr< FragmentIDCollection > | getFragmentIDCollection () const override |
| Get the FragmentIDCollection that is responsible for all fields of this Representation. | |
Public Member Functions inherited from Fiber::BaseSpace | |
| void | addDependency (const MemCore::WeakPtr< BaseSpaceDependency > &) |
| Add an object that will be dependent on the existence of this base space. | |
| BaseSpace () | |
| Constructor. | |
| virtual | ~BaseSpace () |
| Virtual destructor. | |
Public Member Functions inherited from Fiber::Ownable< BaseSpace > | |
| void | x_updateOwnershipAge (const MemCore::Ageable &theNewAge) override |
| Forward some age to all Owners. | |
| void | insertOwner (const Container &theOwner) |
| Add some owner. | |
| bool | insertOwner (const MemCore::WeakPtr< Container > &theOwner) |
| Add some owner. | |
| void | addOwner (const Container &theOwner, const MemCore::Ageable &theNewAge) |
| Add some owner and broadcast a new age to all Ownerrs. | |
| void | addOwner (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge) |
| Add some owner and broadcast a new age to all Ownerrs. | |
| Ownable () | |
| Default constructor, empty Ownership list. | |
| Ownable (const Ownable &) | |
| Copy constructor, does NOT copy any ownership information, the new Ownable will be unowned. | |
| Ownable (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge) | |
| Construct an Ownable with an initial owner. | |
| Ownable (const Container &theOwner, const MemCore::Ageable &theNewAge) | |
| Construct an Ownable with an initial owner. | |
| Ownable & | operator= (const Ownable &) |
| Assignment, does NOT copy any ownership information, the assigned Ownable will retain all its ownership information. | |
| MemCore::WeakPtr< Container > | getPrimaryOwner () const |
| Get the first valid owner. | |
| size_t | getNumberOfValidOwners () const |
| Get the first valid owner. | |
| bool | processOwnership (MemCore::Intercube &Output, const MemCore::Intercube &Input) const override |
| Process some ownership action. | |
Public Member Functions inherited from Fiber::OwnerBase | |
| bool | processOwnership (MemCore::Intercube &OutputAndInput) const |
| Process ownership where the input information is shared with the output information in the same Intercube. | |
Public Member Functions inherited from MemCore::Intercube | |
| void | addInterface (const RefPtr< InterfaceBase > &I) const |
| void | addInterfaceData (const Data &D) |
| void | addInterfaceData (const Data &D) |
| void | clearInterfaces () |
| bool | const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const |
| virtual RefPtr< InterfaceBase > | createInterface (const type_info &) const |
| RefPtr< InterfaceBase > | findInterface (const type_info &t) const |
| RefPtr< InterfaceBase > | getInterface (const type_info &t) |
| std::string | getInterfaceNames (const char delim=';') const |
| bool | gotNewInterfaceData (const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector &S) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector *S) |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector &) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector *) const |
| bool | hasInterface (const type_info &t) const |
| bool | iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) |
| void | printInterfaces () const |
| void | registerInterface (const type_info &t) |
| void | removeInterface () |
| void | removeInterfaceBase (const type_info &InterfaceBaseID) |
Public Member Functions inherited from Fiber::RepresentationMap | |
| void | clear () |
| RefPtrRepresentation_t | makeRepresentation (const Representer &D) |
| Representation & | operator[] (const Representer &D) |
| Retrieve (and possibly create) a Representation. | |
| Representation & | operator[] (const BaseSpace &D) |
| RefPtrRepresentation_t | findRepresentation (const Representer &D) const |
| Query a representation. | |
| RefPtrRepresentation_t | findRepresentation (const BaseSpace &D) |
| RefPtrRepresentation_t | operator() (const Representer &D) const |
| Use operator () to query a representation. | |
| RefPtrRepresentation_t | operator() (const BaseSpace &D) |
| int | DataRank () const |
| RefPtr< SizeInterface > | getSize () const |
| Get the data dimensionality of this Skeleton, which is taken from the positions field of the first representation, whatever it is. | |
| RefPtr< SizeInterface > | getFragmentSize (const RefPtr< FragmentID > &Fid) const |
| int | size () const |
| Return the number of representations available here. | |
| int | getNumberOfRepresentations () const |
| Return the number of representations available here. | |
| std::tuple< Representer, RefPtrRepresentation_t, RefPtr< FragmentIDCollection > > | getFragmentIDCollectionRepresentation () const |
| RefPtr< FragmentID > | findFragmentIDByName (const std::string &FragmentName) const |
| DynamicSize | getFragmentLayout () const |
| int | iterate (ConstIterator &) const |
| Inspect all elements of this map. | |
| int | iterate (Iterator &) |
| Iterate over all elements of this map. | |
| int | iterate (const std::function< bool(const Representer &, const Representation &)> &F) const |
| Immutable iteration via std::function. | |
| int | iterate (const std::function< bool(const Representer &, Representation &)> &F) |
| Mutable iteration via std::function. | |
| template<class Functor > | |
| int | iterate_representations (const Functor &F) const |
| template<class Functor > | |
| int | iterate_all (const Functor &F) const |
| int | getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const |
| Get memory usage. | |
| void | Speak (int indent=0, int maxindent=-1) const |
| Informative debug message. | |
| string | xml () const |
Public Member Functions inherited from Fiber::SkeletonID | |
| SkeletonID (int dimension, int index_depth=0) | |
| Constructor via dimensionality and index depth. | |
| SkeletonID (const std::nullptr_t &) | |
| SkeletonID (const DynamicSize &theDomainSize, int IndexDepth, const DynamicSize &theRefinementSize) | |
| SkeletonID (const SkeletonID &Sid, int index_depth_increment) | |
| Construct a skeleton ID with the same properties but its index depth incremented by a certain amount. | |
| ~SkeletonID () | |
| Destructor. | |
| const SkeletonID & | ID () const |
| Shortcut to ease type conversion in child classes. | |
| bool | operator< (const SkeletonID &S) const |
| Ordering operator, mostly used for stl::map. | |
| int | IndexDepth () const |
| Index depth of this skeleton. | |
| const DynamicSize & | DomainSize () const |
| const DynamicSize & | Size () const |
| const DynamicSize & | RefinementSize () const |
| const DynamicSize & | getRefinementSize () const |
| template<class T > | |
| DynamicSize & | setSize (int N, const T values[]) |
| template<class T > | |
| DynamicSize & | setRefinementSize (int N, const T values[]) |
| template<int N> | |
| auto | setSize (const MultiIndex< N > &I) |
| template<int N> | |
| DynamicSize & | setRefinementSize (const MultiIndex< N > &I) |
| int | Dims () const |
| Dimensionality of this skeleton. | |
| int | getRank () const |
| Dimensionality of this skeleton. | |
| bool | hasCompatibleHigherDims (const DynamicSize &DS) const |
| int | NumberOfRefinementLevels () const |
| Number of available refinement levels This usually matches Dims, but in case of Dims=0 also allows a refinement level. | |
| index_t | Refinement (unsigned int i) const |
| bool | isIsotropicRefinementFactor (index_t F) const |
| Check if the given skeleton ID corresponds to a refinement by factor F in all dimensions. | |
| index_t | getHomogeneousLevel () const |
| IF this skeleton ID refers to a refinement level that is same in all dimensions, return that single integer. | |
| index_t | getTotalRefinement () const |
| unsigned | getDomainSize (unsigned i) const |
| bool | setSize (unsigned i, index_t extension) |
| template<int N> | |
| bool | setSize (MultiIndex< N > &MI) const |
| bool | setSize (const DynamicSize &DS) const |
| const DynamicSize & | setRefinementSize (const DynamicSize &DS) |
| bool | setRefinement (unsigned i, index_t extension) |
| void | setIsotropicRefinement (index_t ref_level) |
| Set the same refinement level in all dimensions of the skeleton dimensionality. | |
| bool | hasRefinement () |
| std::string | Name () const |
| Create a textual representation of the inherent parameters of the Skeleton ID. | |
| bool | operator! () const |
| check for mere validity of this SkeletonID | |
| operator bool () const | |
| check for validity of this SkeletonID | |
Public Member Functions inherited from Fiber::SaveableAttributes | |
| void | attributesHaveBeenSaved () const |
| bool | attributesNeedSaving () const |
Public Member Functions inherited from MemCore::Attributes | |
| MemCore::RefPtr< MemCore::ChunkBase > | getAttribute (const std::string &name) const |
| const Ageable & | getAttributeAge () const |
| std::pair< bool, T > | getAttributeValue (const string &AttributeName, size_t ElementNumber=0) const |
| attributes_t & | getAttributeValues () |
| const attributes_t & | getAttributeValues () const |
| size_t | getNumberOfAttributes () const |
| bool | hasAttribute (const std::string &name) const |
| int | Iterate (const Functor &L) const |
| int | iterate (Iterator &it) const |
| int | iterate_attributes (const Functor &L) const |
| size_t | NumberOfAttributes () const |
| void | setAttribute (const std::string &name, const MemCore::RefPtr< MemCore::ChunkBase > &AttribData) |
| ResizableChunk< T > & | setAttributeValue (const std::string &name, const T &AttribData) |
| ResizableChunk< T > & | setAttributeValues (const std::string &name, const std::initializer_list< T > &AttribData) |
| const T & | setValue (const T &AttribData, const std::string &name) |
| const T & | setValue (const T &AttribData, const std::string &name, const std::string &Comment, const std::string &CommentPrefix="Comment") |
| string | toString () const |
| const Ageable & | touchAttributes () const |
| const Ageable & | updateAttributeAge (const Ageable &A) const |
Protected Types | |
| using | RepresenterList_t = std::unordered_set< Representer > |
Protected Member Functions | |
| ~Skeleton () | |
| Destructor. | |
| RefPtr< Field > | getFieldRecursion (const Representer &R, const string &FieldName, const RefPtr< Atlas > &myAtlas, RepresenterList_t &SkipRepresenters) |
| template<is_field_identifier firstFieldIdentifier_t, is_field_identifier... FieldIdentifiers> | |
| void | getFieldsRecursion (const Representer &R, RefPtr< Field > *Rit, firstFieldIdentifier_t firstFieldIdentifier, FieldIdentifiers... theFieldIdentifiers) |
Friends | |
| class | SkeletonMap |
| std::string | to_string (const Skeleton &) |
Related Symbols | |
(Note that these are not member symbols.) | |
| using | pSkeleton = RefPtr< Skeleton > |
| Shortcut for a strong pointer to a Skeleton object. | |
| typedef WeakPtr< Skeleton > | wSkeleton |
| Shortcut for a weak pointer to a Skeleton object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Fiber::SkeletonID | |
| static SkeletonID | nextRefinement (const SkeletonID &Sid, int refinement_increment) |
| Create a SkeletonID that is refined by a certain increment. | |
| static SkeletonID | refinedSkeleton (const SkeletonID &Sid, int refinement_value) |
| Create a SkeletonID that is refined by a certain value. | |
Public Attributes inherited from Fiber::Ownable< BaseSpace > | |
| std::unordered_set< MemCore::WeakPtr< Container > > | Owners |
| The (internal) list of owners. | |
Public Attributes inherited from Fiber::SaveableAttributes | |
| MemCore::Ageable | LastSavedAttributes |
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
It defines the Skeleton Space of a discretized Grid. Allows to store sets as mappings from Domain objects to corresponding Representations of the underlying discretized space.
Note, that Skeleton inherits all operators and functions to create and access Representations from the RepresentationMap!
Skeleton objects can be created only through a SkeletonMap, the base class of a Grid object.
| RefPtr< Field > Fiber::Skeleton::createIndirectedField | ( | const Representer & | WantRep, |
| const RefPtr< Field > & | RelativeIndices, | ||
| const string & | FieldName, | ||
| const RefPtr< Field > & | SourceField, | ||
| const RefPtr< Field > & | SourcePositions | ||
| ) |
| SourcePositions | The Positions field from the same representation where the SourceField came from. |
References Fiber::pullData().
|
overridevirtual |
The topological dimensionality of this Skeleton.
Implements Fiber::BaseSpace.
Referenced by Fiber::ShapefileSaver::apply_const(), and Fiber::FragmentTopology::findHighestDimensionalRepresentation().
| RefPtr< Field > Fiber::Skeleton::getField | ( | const Representer & | R, |
| const RefPtr< FieldID > & | Fid, | ||
| const RefPtr< Atlas > & | myAtlas = nullptr, |
||
| const RepresenterList_t & | SkipRepresenters = {} |
||
| ) |
Get a field relative to the specified representer.
This function might involve some coordinate transformation or re-indexing if the queried field does not yet exist relative to the given representer.
| R | The identifier of the representation in which the field is requested. For instance, this may be a chart object (a coordinate system). |
| Fid | A field identifier, it must match exactly. |
References Fiber::Representation::findField().
| RefPtr< Field > Fiber::Skeleton::getField | ( | const Representer & | R, |
| const std::string & | FieldName, | ||
| const RefPtr< Atlas > & | myAtlas = nullptr, |
||
| const RepresenterList_t & | SkipRepresenters = {} |
||
| ) |
Get a field relative to the specified representer.
This function might involve some coordinate transformation or re-indexing if the queried field does not yet exist relative to the given representer.
| R | The identifier of the representation in which the field is requested. For instance, this may be a chart object (a coordinate system). Given a ChartID, a Chart object, suitable as Representer, can be retrieved from a Grid object. |
| Fid | A field identifier, it is sufficient if the name matches. |
|
inline |
Get a set of array creators at once from a Skeleton and a Representer such as a chart object, all for the same fragment as specified by the fragment ID (which is a nullptr for an unfragmented field):
|
inline |
Get a number of fields at once from a Skeleton and a Representer such as a chart object:
|
overridevirtual |
Get the FragmentIDCollection that is responsible for all fields of this Representation.
This will be the FragmentIDCollection of the first Representation that has one.
Reimplemented from Fiber::RepresentationMap.
|
inline |
Get the positions field in the given representation.
This function simply calls getField() with FieldName=FIBER_POSITIONS.
Iterate over all fields on all Representations of this Skeleton.
Note that the same field may appear multiple times - this function does NOT perform any uniqueness checks, such must be done in the FieldIterator itself.
Iterate over all fields on all Representations of this Skeleton, also providing information on the Representation and Representer (e.g.
a chart).
|
inlineoverridevirtual |
Implements Fiber::BaseSpace.
|
overridevirtual |
Implements Fiber::BaseSpace.