numerical-collection-cpp
0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
is_eigen_matrix.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021 MusicScience37 (Kenta Kabashima)
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
20
#pragma once
21
22
#include <type_traits>
23
24
#include <Eigen/Core>
25
26
namespace
num_collect
{
27
33
template
<
typename
Type>
34
class
is_eigen_matrix
:
public
std::false_type {};
35
41
template
<
typename
Scalar,
int
Rows,
int
Cols,
int
Options,
int
MaxRows,
42
int
MaxCols>
43
class
is_eigen_matrix
<
44
Eigen
::Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols>>
45
:
public
std::true_type {};
46
52
template
<
typename
Type>
53
constexpr
bool
is_eigen_matrix_v
=
is_eigen_matrix<Type>::value
;
54
55
}
// namespace num_collect
num_collect::is_eigen_matrix
Class to check whether a type is a Eigen's matrix.
Definition
is_eigen_matrix.h:34
Eigen
Namespace of Eigen library.
Definition
variable.h:416
num_collect
Namespace of num_collect source codes.
Definition
create_diff_variable.h:33
num_collect::is_eigen_matrix_v
constexpr bool is_eigen_matrix_v
Get whether a type is a Eigen's matrix.
Definition
is_eigen_matrix.h:53
include
num_collect
util
is_eigen_matrix.h
Generated on Sat Jan 18 2025 03:47:34 for numerical-collection-cpp by
1.12.0