MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ infer_structure()

template<ComputeData T>
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > MayaFlux::Yantra::infer_structure ( const T &  data,
const std::shared_ptr< Kakshya::SignalSourceContainer > &  container = nullptr 
)
static

Infer dimensions and modality from any ComputeData type.

Template Parameters
TComputeData type
Parameters
dataInput data to analyze
Returns
Pair of (dimensions, modality)

Definition at line 147 of file StructureIntrospection.hpp.

148{
149
150 if constexpr (CompositeArrayData<T>) {
151 return infer_from_composite_array(data);
152 } else if constexpr (CompositeContainerData<T>) {
153 return infer_from_composite_container(data);
154 } else if constexpr (std::is_same_v<T, Kakshya::DataVariant>) {
155 return infer_from_data_variant(data);
156 } else if constexpr (std::is_same_v<T, std::shared_ptr<Kakshya::SignalSourceContainer>>) {
157 return infer_from_container(data);
158 } else if constexpr (std::is_same_v<T, Kakshya::Region>) {
159 return infer_from_region(data, container);
160 } else if constexpr (std::is_same_v<T, Kakshya::RegionGroup>) {
161 return infer_from_region_group(data, container);
162 } else if constexpr (std::is_same_v<T, std::vector<Kakshya::RegionSegment>>) {
163 return infer_from_segments(data, container);
164 } else if constexpr (is_eigen_matrix_v<T>) {
165 return infer_from_eigen(data);
166 } else {
167 return infer_generic_structure(data);
168 }
169}
An owning array of schema-bearing Composite elements.
Definition DataSpec.hpp:41
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_eigen(const EigenType &eigen_data)
Infer structure from Eigen matrix/vector.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_composite_array(const Kakshya::CompositeArray &data)
Infer the element axis and modality of a CompositeArray.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_region(const Kakshya::Region &region, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from Region (placeholder since regions are markers)
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_segments(const std::vector< Kakshya::RegionSegment > &segments, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from RegionSegments.
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_generic_structure(const T &data)
Generic structure inference for unknown types.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_container(const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from SignalSourceContainer.
std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > infer_from_region_group(const Kakshya::RegionGroup &group, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from RegionGroup.

References infer_from_composite_array(), infer_from_composite_container(), infer_from_container(), infer_from_data_variant(), infer_from_eigen(), infer_from_region(), infer_from_region_group(), infer_from_segments(), and infer_generic_structure().

Referenced by MayaFlux::Yantra::Datum< T >::Datum(), MayaFlux::Yantra::Datum< T >::Datum(), MayaFlux::Yantra::Datum< T >::Datum(), and MayaFlux::Yantra::Datum< T >::Datum().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: