OGS
LinAlgEnums.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#include "LinAlgEnums.h"
5
6namespace MathLib
7{
9{
10 switch (normType)
11 {
13 return "NORM1";
15 return "NORM2";
17 return "INFINITY_N";
18 default:
19 return "INVALID";
20 }
21}
22
24{
25 if (str == "NORM1")
26 {
27 return VecNormType::NORM1;
28 }
29 if (str == "NORM2")
30 {
31 return VecNormType::NORM2;
32 }
33 if (str == "INFINITY_N")
34 {
36 }
38}
39
40} // end namespace MathLib
std::string convertVecNormTypeToString(VecNormType normType)
convert VecNormType to string
VecNormType convertStringToVecNormType(const std::string &str)
convert string to VecNormType