TDMS
Time Domain Maxwell Solver
All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
matrix_collection.h
Go to the documentation of this file.
1/**
2 * @file matrix_collection.h
3 * @brief A collection of named MATLAB matrices.
4 */
5#pragma once
6
7#include <string>
8#include <vector>
9
10#include "mat_io.h"
11
12/**
13 * A collection of matlab matrices with names
14 */
16
17public:
18 int n_matrices = 0;//< The number of matrices in the collection
19 std::vector<std::string> matrix_names;//< The names of the matrices
20
21 /** @brief Construct a new Matrix Collection object */
22 MatrixCollection() = default;
23
24 /**
25 * @brief Construct a new Matrix Collection object
26 *
27 * @param names of the matrices
28 * @param number of matrices in the collection
29 */
30 explicit MatrixCollection(std::vector<std::string> names);
31
32 /**
33 * @brief Check we have as many or more matrices than another
34 * MatrixCollection
35 *
36 * Throws a runtime error if there are fewer matrices in the other
37 * MatrixCollection
38 *
39 * @param other the other MatrixCollection
40 */
42};
43
44
45/**
46 * A collection of matlab matrices with names created from a .mat file
47 */
49
50public:
51 MATFile *mat_file;
52
53 explicit MatFileMatrixCollection(const char *filename);
54
56};
Definition matrix_collection.h:48
Definition matrix_collection.h:15
MatrixCollection(std::vector< std::string > names)
Construct a new Matrix Collection object.
void check_has_at_least_as_many_matrices_as(MatrixCollection &other)
Check we have as many or more matrices than another MatrixCollection.
Definition matrix_collection.cpp:28
MatrixCollection()=default
Construct a new Matrix Collection object.
Includes MATLAB headers for I/O.