vector_.cc
999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
*
*
* Created on: 31 aug. 2020
* Author: AKKA IS
*/
#include "vector_.hh"
#include <cmath>
template <typename Type>
std::vector<Type> _vector(const Type& comp1, const Type& comp2, const Type& comp3) {
std::vector<Type> vec;
vec.push_back(comp1);
vec.push_back(comp2);
vec.push_back(comp3);
return vec;
}
std::vector<int> vector_(const int& comp1, const int& comp2, const int& comp3) {
return _vector(comp1, comp2, comp3);
}
std::vector<double> vector_(const double& comp1, const double& comp2, const double& comp3) {
return _vector(comp1, comp2, comp3);
}
std::vector<long double> vector_(const long double& comp1, const long double& comp2, const long double& comp3) {
return _vector(comp1, comp2, comp3);
}
std::vector<short> vector_(const short& comp1, const short& comp2, const short& comp3) {
return _vector(comp1, comp2, comp3);
}
std::vector<float> vector_(const float& comp1, const float& comp2, const float& comp3) {
return _vector(comp1, comp2, comp3);
}