MayaFlux 0.1.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 133 of file StructureIntrospection.hpp.

134{
135
136 if constexpr (std::is_same_v<T, Kakshya::DataVariant>) {
137 return infer_from_data_variant(data);
138 } else if constexpr (std::is_same_v<T, std::shared_ptr<Kakshya::SignalSourceContainer>>) {
139 return infer_from_container(data);
140 } else if constexpr (std::is_same_v<T, Kakshya::Region>) {
141 return infer_from_region(data, container);
142 } else if constexpr (std::is_same_v<T, Kakshya::RegionGroup>) {
143 return infer_from_region_group(data, container);
144 } else if constexpr (std::is_same_v<T, std::vector<Kakshya::RegionSegment>>) {
145 return infer_from_segments(data, container);
146 } else if constexpr (std::is_base_of_v<Eigen::MatrixBase<T>, T>) {
147 return infer_from_eigen(data);
148 } else {
149 return infer_generic_structure(data);
150 }
151}
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_data_variant(const Kakshya::DataVariant &data)
Infer structure from DataVariant.
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_region_group(const Kakshya::RegionGroup &group, const std::shared_ptr< Kakshya::SignalSourceContainer > &container)
Infer structure from RegionGroup.
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.

References 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::OperationHelper::extract_structured_double().

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