OGS
LinAlgEnums.cpp
Go to the documentation of this file.
1
13
#include "
LinAlgEnums.h
"
14
15
namespace
MathLib
16
{
17
std::string
convertVecNormTypeToString
(
VecNormType
normType)
18
{
19
switch
(normType)
20
{
21
case
VecNormType::NORM1
:
22
return
"NORM1"
;
23
case
VecNormType::NORM2
:
24
return
"NORM2"
;
25
case
VecNormType::INFINITY_N
:
26
return
"INFINITY_N"
;
27
default
:
28
return
"INVALID"
;
29
}
30
}
31
32
VecNormType
convertStringToVecNormType
(
const
std::string& str)
33
{
34
if
(str ==
"NORM1"
)
35
{
36
return
VecNormType::NORM1
;
37
}
38
if
(str ==
"NORM2"
)
39
{
40
return
VecNormType::NORM2
;
41
}
42
if
(str ==
"INFINITY_N"
)
43
{
44
return
VecNormType::INFINITY_N
;
45
}
46
return
VecNormType::INVALID
;
47
}
48
49
}
// end namespace MathLib
LinAlgEnums.h
MathLib
Definition
CreateComponent.h:32
MathLib::VecNormType
VecNormType
Definition
LinAlgEnums.h:23
MathLib::VecNormType::NORM2
@ NORM2
MathLib::VecNormType::NORM1
@ NORM1
MathLib::VecNormType::INVALID
@ INVALID
MathLib::VecNormType::INFINITY_N
@ INFINITY_N
MathLib::convertVecNormTypeToString
std::string convertVecNormTypeToString(VecNormType normType)
convert VecNormType to string
Definition
LinAlgEnums.cpp:17
MathLib::convertStringToVecNormType
VecNormType convertStringToVecNormType(const std::string &str)
convert string to VecNormType
Definition
LinAlgEnums.cpp:32
MathLib
LinAlg
LinAlgEnums.cpp
Generated by
1.12.0