TDMS
Time Domain Maxwell Solver
Toggle main menu visibility
Loading...
Searching...
No Matches
dimensions.h
Go to the documentation of this file.
1
/**
2
* @file dimensions.h
3
* @brief Defines a class that serves as an explicit converter between MATLAB
4
* pointers and array dimensions
5
*/
6
#pragma once
7
8
#include "
mat_io.h
"
9
10
class
Dimensions {
11
private
:
12
int
i
= 0;
//!< Extent of dimension 1
13
int
j
= 0;
//!< Extent of dimension 2
14
int
k
= 0;
//!< Extent of dimension 3
15
16
bool
are_nd(
int
n)
const
{
return
(
bool
(
i
) +
bool
(
j
) +
bool
(
k
)) == n; }
17
18
public
:
19
int
operator[](
int
value)
const
;
20
21
explicit
Dimensions
(
const
mxArray *ptr);
22
23
bool
are_1d()
const
{
return
are_nd(1); }
24
bool
are_2d()
const
{
return
are_nd(2); }
25
};
Dimensions
Definition
dimensions.h:10
Dimensions::k
int k
Extent of dimension 3.
Definition
dimensions.h:14
Dimensions::j
int j
Extent of dimension 2.
Definition
dimensions.h:13
Dimensions::i
int i
Extent of dimension 1.
Definition
dimensions.h:12
mat_io.h
Includes MATLAB headers for I/O.
tdms
include
dimensions.h
Generated by
1.17.0