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

◆ recreate_eigen_matrix() [2/2]

Eigen::MatrixXd MayaFlux::Yantra::OperationHelper::recreate_eigen_matrix ( const std::vector< std::vector< double > > &  columns,
const DataStructureInfo structure_info 
)
staticprivate

Infer data structure from ComputeData type.

Template Parameters
TComputeData type
Parameters
compute_dataInput data
containerOptional container for region-like types
Returns
Pair of (dimensions, modality)

Definition at line 80 of file OperationHelper.cpp.

83{
84 if (columns.empty()) {
85 return {};
86 }
87
88 if (structure_info.dimensions.size() >= 2) {
89 int expected_rows = static_cast<int>(structure_info.dimensions[0].size);
90 int expected_cols = static_cast<int>(structure_info.dimensions[1].size);
91
92 if (columns.size() != expected_cols) {
93 error<std::invalid_argument>(Journal::Component::Yantra, Journal::Context::Runtime, std::source_location::current(),
94 "Column count doesn't match dimension info. Expected {}, got {}", expected_cols, columns.size());
95 }
96 if (!columns.empty() && columns[0].size() != expected_rows) {
97 error<std::invalid_argument>(Journal::Component::Yantra, Journal::Context::Runtime, std::source_location::current(),
98 "Row count doesn't match dimension info. Expected {}, got {}", expected_rows, columns[0].size());
99 }
100
101 return create_eigen_matrix(columns);
102 }
103
104 return create_eigen_matrix(columns);
105}
static Eigen::MatrixXd create_eigen_matrix(const std::vector< std::vector< T > > &columns)
Infer data structure from ComputeData type.
@ Runtime
General runtime operations (default fallback)
@ Yantra
DSP algorithms, computational units, matrix operations, Grammar.

References create_eigen_matrix(), MayaFlux::Yantra::DataStructureInfo::dimensions, MayaFlux::Journal::Runtime, and MayaFlux::Journal::Yantra.

Referenced by reconstruct_from_double().

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