Mimetic Operators Library Enhanced 4.0
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef UTILS_H
4#define UTILS_H
5
6#include <armadillo>
7
8using Real = double;
9using namespace arma;
10
11class Utils
12{
13public:
14 static sp_mat spkron(const sp_mat &A, const sp_mat &B);
15 static sp_mat spjoin_rows(const sp_mat &A, const sp_mat &B);
16 static sp_mat spjoin_cols(const sp_mat &A, const sp_mat &B);
17 static vec spsolve_eigen(const sp_mat &A, const vec &b);
18 // MATLAB-like MeshGrid
19 void meshgrid(const vec &x, const vec &y, mat &X, mat &Y);
20 void meshgrid(const vec &x, const vec &y, const vec &z, cube &X, cube &Y, cube &Z);
21};
22
23#endif // UTILS_H
Definition utils.h:12
static sp_mat spjoin_cols(const sp_mat &A, const sp_mat &B)
Definition utils.cpp:120
static sp_mat spjoin_rows(const sp_mat &A, const sp_mat &B)
Definition utils.cpp:85
static vec spsolve_eigen(const sp_mat &A, const vec &b)
static sp_mat spkron(const sp_mat &A, const sp_mat &B)
Definition utils.cpp:53
void meshgrid(const vec &x, const vec &y, mat &X, mat &Y)
Definition utils.cpp:155
double Real
Definition utils.h:8