numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
is_eigen_vector.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
26namespace num_collect {
27
33template <typename Type>
34class is_eigen_vector : public std::false_type {};
35
41template <typename Scalar, int Rows, int Options, int MaxRows, int MaxCols>
42class is_eigen_vector<Eigen::Matrix<Scalar, Rows, 1, Options, MaxRows, MaxCols>>
43 : public std::true_type {};
44
50template <typename Type>
52
53} // namespace num_collect
Class to check whether a type is a Eigen's vector.
Namespace of Eigen library.
Definition variable.h:416
Namespace of num_collect source codes.
constexpr bool is_eigen_vector_v
Get whether a type is a Eigen's vector.