monolish
0.14.0
MONOlithic LIner equation Solvers for Highly-parallel architecture
src
utils
create_matrix
laplacian.cpp
Go to the documentation of this file.
1
#include "../../../include/monolish_blas.hpp"
2
#include "../../internal/monolish_internal.hpp"
3
4
namespace
monolish
{
5
6
template
<
typename
T>
matrix::COO<T>
util::laplacian_matrix_1D
(
const
int
&M) {
7
return
util::tridiagonal_toeplitz_matrix<T>(M, 2.0, -1.0);
8
}
9
template
matrix::COO<double>
util::laplacian_matrix_1D
(
const
int
&M);
10
template
matrix::COO<float>
util::laplacian_matrix_1D
(
const
int
&M);
11
12
template
<
typename
T>
13
T
util::laplacian_matrix_1D_eigenvalue
(
const
int
&M,
int
N) {
14
return
util::tridiagonal_toeplitz_matrix_eigenvalue<T>(M, N, 2.0, -1.0);
15
}
16
template
double
util::laplacian_matrix_1D_eigenvalue
(
const
int
&M,
int
N);
17
template
float
util::laplacian_matrix_1D_eigenvalue
(
const
int
&M,
int
N);
18
19
}
// namespace monolish
monolish
Definition:
monolish_matrix_blas.hpp:9
monolish::matrix::COO
Coodinate (COO) format Matrix (need to sort)
Definition:
monolish_coo.hpp:38
monolish::util::laplacian_matrix_1D_eigenvalue
T laplacian_matrix_1D_eigenvalue(const int &M, int N)
Nth smallest eigenvalue of 1D Laplacian matrix.
Definition:
laplacian.cpp:13
monolish::util::laplacian_matrix_1D
matrix::COO< T > laplacian_matrix_1D(const int &M)
create 1D Laplacian matrix
Definition:
laplacian.cpp:6
Generated by
1.8.17