TDMS
Time Domain Maxwell Solver
Toggle main menu visibility
Loading...
Searching...
No Matches
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
*/
15
class
MatrixCollection
{
16
17
public
:
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
*/
41
void
check_has_at_least_as_many_matrices_as
(
MatrixCollection
&other);
42
};
43
44
45
/**
46
* A collection of matlab matrices with names created from a .mat file
47
*/
48
class
MatFileMatrixCollection :
public
MatrixCollection
{
49
50
public
:
51
MATFile *mat_file;
52
53
explicit
MatFileMatrixCollection(
const
char
*filename);
54
55
~MatFileMatrixCollection();
56
};
MatrixCollection::MatrixCollection
MatrixCollection(std::vector< std::string > names)
Construct a new Matrix Collection object.
MatrixCollection::check_has_at_least_as_many_matrices_as
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::MatrixCollection
MatrixCollection()=default
Construct a new Matrix Collection object.
mat_io.h
Includes MATLAB headers for I/O.
tdms
include
matrix_collection.h
Generated by
1.17.0