Cosan  1.0
Data Analytics Library
templateTest.cpp File Reference
#include <iostream>
#include <vector>
#include <type_traits>
#include <numeric>
#include <string>
#include <gsl/gsl>
#include <Eigen/Dense>

Go to the source code of this file.

Classes

class  Cosan::Test< NumericType, typename >
 

Namespaces

 Cosan
 

Typedefs

template<typename NumericType , typename = typename std::enable_if<std::is_arithmetic<NumericType>::value,NumericType>::type>
using Cosan::vec = std::vector< NumericType >
 

Functions

template<typename NumericType = std::string>
NumericType Cosan::StringToNum (std::string arg)
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 77 of file templateTest.cpp.

77  {
78 
79  // std::vector<bool> myVec = {0,1,1,0,0,1,0,1,0,1};
80  // Eigen::Matrix<bool,2,5,Eigen::RowMajor> X1,X2;
81  // for (gsl::index i =0;i<myVec.size();i++){
82  // X1(i/5,i%5)=myVec[i];
83  // }
84  // std::copy(myVec.begin(),myVec.end(),X2.data());
85  // std::cout<<X1<<std::endl;
86  // X2.resize(2, 5);
87  // std::cout<<X2<<std::endl;
88  // std::string a = "nan";
89  // std::cout<<Cosan::StringToNum<int>(a)<<std::endl;
91  a.face.resize(2,2);
92  a.face<<1,2,3,4;
93  std::cout<<a.face<<std::endl;
94  static_assert(std::is_same_v<decltype(a.face)::Scalar, int>);
95  std::cout<<typeid(decltype(a.face)::Scalar).name()<<std::endl;
96  return 0;
97 }
Cosan::Test
Definition: templateTest.cpp:51
Cosan::Test::face
CosanMatrix< NumericType > face
Definition: templateTest.cpp:66