FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Static Public Member Functions | Related Symbols | List of all members
Fiber::DataRange< Type > Struct Template Reference

Class for ranges of types, such as minimum/maximum. More...

#include <Range.hpp>

Inheritance diagram for Fiber::DataRange< Type >:
Fiber::DataRangeBase std::array< Type, 2 > MemCore::Interface< DataRangeBase > MemCore::Ageable MemCore::InterfaceBase MemCore::ReferenceBase< InterfaceBase >

Public Types

using float_version = Range_as_FloatVersion< Type >
 
using float_range_type = typename Range_as_FloatVersion< Type >::type
 
- Public Types inherited from Fiber::DataRangeBase
typedef RefPtr< DataRangeBasecompute_range_and_set_attribute_func(CreativeArrayBase &CAB, const RefPtr< MemBase > &ArrayBase)
 
typedef RefPtr< DataRangeBaseget_range_if_older_than_creator_data_func(CreativeArrayBase &CAB)
 
- Public Types inherited from MemCore::Interface< DataRangeBase >
typedef Domain InterfaceDomain_t
 
- Public Types inherited from MemCore::ReferenceBase< InterfaceBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 

Public Member Functions

Type & Minimum ()
 
Type & Maximum ()
 
const Type & Minimum () const
 
const Type & Maximum () const
 
 DataRange ()
 Default constructor, no initializiation.
 
 DataRange (const Type &min, const Type &max)
 Initialize constructor with min and max.
 
 DataRange (const Ageable &Age)
 
 DataRange (const Ageable &Age, const Type &min, const Type &max)
 Initialize constructor age (may be important!!) with min and max.
 
const Type & Min () const
 The minimum.
 
const Type & Max () const
 The maximum.
 
RefPtr< DataRangeBasegetFloatRange () const override
 Always double precison!
 
std::string str () const override
 
template<class OtherType >
 DataRange (const DataRange< OtherType > &DR)
 Initialize the range by a given type, which must be convertible.
 
template<class OtherType >
void expand (const DataRange< OtherType > &DR)
 Expand the range by a given type, which must be convertible.
 
void expandRange (const RefPtr< DataRangeBase > &DRB) override
 Expand range by same type.
 
template<class CompareType >
bool contains (const CompareType &Value) const
 Check if certain value is contained here.
 
RefPtr< DataRangeBasegetIndexedRange (const RefPtr< MemBase > &ArrayBase, const std::vector< uint32_t > &index_array) const override
 
RefPtr< DataRangeBasegetIndexedRange (const RefPtr< MemBase > &ArrayBase, const std::vector< size_t > &index_array) const override
 
- Public Member Functions inherited from Fiber::DataRangeBase
 DataRangeBase (DataRangeBase &Db)
 Copy Constructor.
 
 DataRangeBase ()
 Constructor, age will be youngest.
 
 DataRangeBase (const MemCore::Ageable &Age)
 Construct with specific age.
 
virtual ~DataRangeBase ()=0
 Pure virtual destructor.
 
- Public Member Functions inherited from MemCore::Interface< DataRangeBase >
const type_info & getInterfaceDomain () const
 
- Public Member Functions inherited from MemCore::InterfaceBase
virtual bool apply (Intercube &I, const RefPtr< InterfaceIterationParameter > &)
 
virtual bool apply_const (const Intercube &I, const RefPtr< InterfaceIterationParameter > &)
 
- Public Member Functions inherited from MemCore::ReferenceBase< InterfaceBase >
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 
- Public Member Functions inherited from MemCore::Ageable
constexpr Ageable (age_t t) noexcept
 
constexpr Ageable (const Ageable &A) noexcept
 
 Ageable (const volatile Ageable &A) noexcept
 
constexpr const AgeablegetAge () const
 
bool isNewerThan (const Ageable &a) const noexcept
 
bool isOlderThan (const Ageable &a) const noexcept
 
bool isYoungerThan (const Ageable &a) const noexcept
 
bool operator!= (const Ageable &a) const noexcept
 
bool operator< (const Ageable &a) const noexcept
 
bool operator<= (const Ageable &a) const noexcept
 
bool operator<= (const volatile Ageable &a) const volatile noexcept
 
bool operator== (const Ageable &a) const noexcept
 
bool operator> (const Ageable &a) const noexcept
 
bool operator> (const volatile Ageable &a) const volatile
 
bool operator>= (const Ageable &a) const noexcept
 
bool operator>= (const volatile Ageable &a) const volatile noexcept
 
constexpr void resetAge () noexcept
 
void setInfinitelyNew () noexcept
 
age_t time_value () const noexcept
 
age_t time_value () const volatile noexcept
 
Ageabletouch () noexcept
 
age_t update (age_t age) noexcept
 
age_t update (const Ageable &Other) noexcept
 
age_t update (const volatile Ageable &Other) volatile noexcept
 

Static Public Member Functions

static RefPtr< DataRangeget_attribute (const CreativeArrayBase &CAB)
 Get the range attribute for a Fragment's Creator if the attributes are valid, i.e.
 
static RefPtr< DataRangeset_from_attribute (CreativeArrayBase &CAB)
 
static RefPtr< DataRangeget_attribute (const Field &F)
 Get the range attribute for a Field if the attributes are valid, i.e.
 
static RefPtr< DataRangeset_from_attribute (Field &F)
 
static RefPtr< DataRangeget_cached_range_if_older_than_data (const CreativeArrayBase &CAB)
 
static RefPtr< DataRangeget_range_if_older_than_data (CreativeArrayBase &CAB)
 Get a cached range from the creative array if the data are older or than the range.
 
static RefPtr< DataRangeBaseget_range_if_older_than_creator_data (CreativeArrayBase &CAB)
 
static RefPtr< DataRangeget_cached_range_if_older_than_field (const Field &F)
 Get a cached range from the Field if the data are older or than the range.
 
static RefPtr< DataRangeget_cached_range (const Field &F)
 Get any range information that is available from the Field, used e.g.
 
static RefPtr< DataRangeget_range_if_older_than_field (Field &F)
 Get a cached range from the Field if the data are older or than the range.
 
static RefPtr< DataRangecompute_range (const RefPtr< MemBase > &ArrayBase, const string &ProvenancePath)
 Perform an actual computation of the range.
 
template<typename index_t >
static RefPtr< DataRangecompute_indexed_range (const RefPtr< MemBase > &ArrayBase, const std::vector< index_t > &index_array)
 
static bool creator_has_compatible_type (CreativeArrayBase &CAB)
 
static RefPtr< DataRangeBasecompute_range_and_set_attribute (CreativeArrayBase &CAB, const RefPtr< MemBase > &ArrayBase)
 unconditionally compute: Overwrites a given attribute or interface.
 
static RefPtr< DataRangepossibly_compute_and_set_attribute (CreativeArrayBase &CAB, bool AsynchRequest, bool AvoidDataLoading, const RefPtr< MemBase > &PossibleData)
 Ignore an existing Range attribute and try to compute the Range newly if the data are available (and create them, if AvoidDataloading is false), then overwrite an existing Range attribute with the new value.
 
static RefPtr< DataRangeretrieve (CreativeArrayBase &CAB, bool AsynchRequest=false, bool AvoidDataLoading=false, const RefPtr< MemBase > &PossibleData=nullptr)
 Provide a data range on a given CreativeArrayBase from the attribute, if such exists and is older than the data itself, or perform a computation and store the result as attribute.
 
static RefPtr< DataRangeretrieve (Field &F, const RefPtr< FragmentID > &f, bool AsynchRequest, bool AvoidDataLoading=false)
 
static bool expand_range (RefPtr< DataRange< Type > > &GlobalRange, const RefPtr< DataRange< Type > > &LocalRange)
 
static bool compute_and_expand_range (RefPtr< DataRange< Type > > &GlobalRange, const RefPtr< FragmentID > &f, const RefPtr< CreativeArrayBase > &cab, bool theAsynchRequest, bool theAvoidDataLoading)
 
static void computeRangeOnAvailableFragments (Field &F, bool RequestToLoadMore=false)
 
static RefPtr< DataRange< Type > > retrieve (Field &F, bool theAsynchRequest, bool theAvoidDataLoading=false)
 
- Static Public Member Functions inherited from Fiber::DataRangeBase
static void clear (CreativeArrayBase &CAB)
 
static void clear (Field &F)
 
static RefPtr< MemCore::ChunkBaseget_range_attribute (const Field &F)
 
static RefPtr< DataRangeBaseget_cached_rangebase_if_older_than_field (const Field &F)
 
static bool need_to_recompute (const Field &F)
 
static void setRangeCompleteness (Field &F, unsigned nFragments, unsigned FragmentsNotUsedForRangeComputation)
 
static bool isRangeComplete (Field &F)
 
static void computeRangeOnAvailableFragments (Field &F, compute_range_and_set_attribute_func *typed_compute_function, get_range_if_older_than_creator_data_func *range_determinator, bool RequestToLoadMore=false)
 
- Static Public Member Functions inherited from MemCore::Ageable
static const AgeableInfinitelyNew () noexcept
 
static constexpr const AgeableInfinitelyOld () noexcept
 
static age_t now () noexcept
 

Related Symbols

(Note that these are not member symbols.)

static RefPtr< DataRange< Type > > setFieldRange (Field &F, const Type &Min, const Type &Max, bool Unchangeable=false)
 Set, and overwrite, and explicit range attribute on a Field.
 
static RefPtr< DataRange< Type > > setCreatorRange (CreativeArrayBase &CAB, const Type &Min, const Type &Max)
 Set, and overwrite, and explicit range attribute on a Creator.
 
template<class Type >
RefPtr< DataRange< Type > > setFieldRange (Field &F, const Type &Min, const Type &Max)
 Set the range information on a field with type information as provided implicitly by the type of the Min/Max arguments.
 
template<class Type >
RefPtr< DataRange< Type > > setCreatorRange (CreativeArrayBase &CAB, const Type &Min, const Type &Max)
 Set the range information on a data Creator with type information as provided implicitly by the type of the Min/Max arguments.
 

Additional Inherited Members

- Public Attributes inherited from std::array< Type, 2 >
elements
 STL member.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< InterfaceBase >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 

Detailed Description

template<class Type>
struct Fiber::DataRange< Type >

Class for ranges of types, such as minimum/maximum.

Examples
ModifyingPointCloudRange.cpp, and TransparentColoredSurface.cpp.

Member Function Documentation

◆ creator_has_compatible_type()

template<class Type >
static bool Fiber::DataRange< Type >::creator_has_compatible_type ( CreativeArrayBase CAB)
inlinestatic

◆ expandRange()

template<class Type >
void Fiber::DataRange< Type >::expandRange ( const RefPtr< DataRangeBase > &  DRB)
inlineoverridevirtual

Expand range by same type.

Implements Fiber::DataRangeBase.

References Fiber::DataRange< Type >::expand().

◆ get_attribute() [1/2]

template<class Type >
static RefPtr< DataRange > Fiber::DataRange< Type >::get_attribute ( const CreativeArrayBase CAB)
inlinestatic

Get the range attribute for a Fragment's Creator if the attributes are valid, i.e.

they are older than the Creator's age.

Parameters
CABThe Creator.

References Fiber::DataRange< Type >::DataRange(), MemCore::Ageable::getAge(), MemCore::Attributes::getAttribute(), MemCore::Ageable::isOlderThan(), and MemCore::Typename().

Referenced by Fiber::DataRange< Type >::get_cached_range().

◆ get_attribute() [2/2]

template<class Type >
static RefPtr< DataRange > Fiber::DataRange< Type >::get_attribute ( const Field F)
inlinestatic

Get the range attribute for a Field if the attributes are valid, i.e.

they are older than the Field's age.

Parameters
FThe Field.

References Fiber::DataRange< Type >::DataRange().

◆ get_cached_range()

template<class Type >
static RefPtr< DataRange > Fiber::DataRange< Type >::get_cached_range ( const Field F)
inlinestatic

Get any range information that is available from the Field, used e.g.

for visualization. This function does not check the age or completeness of the range information ( DataRangeBase::isRangeComplete() );

References Fiber::DataRange< Type >::get_attribute().

◆ getFloatRange()

template<class Type >
RefPtr< DataRangeBase > Fiber::DataRange< Type >::getFloatRange ( ) const
inlineoverridevirtual

Always double precison!

Implements Fiber::DataRangeBase.

References Fiber::DataRange< Type >::Max(), and Fiber::DataRange< Type >::Min().

◆ getIndexedRange() [1/2]

template<class Type >
RefPtr< DataRangeBase > Fiber::DataRange< Type >::getIndexedRange ( const RefPtr< MemBase > &  ArrayBase,
const std::vector< size_t > &  index_array 
) const
inlineoverridevirtual

Implements Fiber::DataRangeBase.

◆ getIndexedRange() [2/2]

template<class Type >
RefPtr< DataRangeBase > Fiber::DataRange< Type >::getIndexedRange ( const RefPtr< MemBase > &  ArrayBase,
const std::vector< uint32_t > &  index_array 
) const
inlineoverridevirtual

Implements Fiber::DataRangeBase.

◆ str()

template<class Type >
std::string Fiber::DataRange< Type >::str ( ) const
inlineoverridevirtual

Implements Fiber::DataRangeBase.