GraceQ/MPS2
A high-performance matrix product state algorithms library based on GraceQ/tensor
Public Types | Public Member Functions | List of all members
gqmps2::CaseParamsParserBasic Class Reference

Basic simulation case parameter parser. More...

#include <case_params_parser.h>

Public Types

using json = nlohmann::json
 

Public Member Functions

 CaseParamsParserBasic (const char *file)
 Create simulation case parameters parser. More...
 
int ParseInt (const std::string &item)
 Parse a int parameter. More...
 
double ParseDouble (const std::string &item)
 Parse a float parameter. More...
 
char ParseChar (const std::string &item)
 Parse a char parameter. More...
 
std::string ParseStr (const std::string &item)
 Parse a std::string parameter. More...
 
bool ParseBool (const std::string &item)
 Parse a bool parameter. More...
 

Detailed Description

Basic simulation case parameter parser.

Since
version 0.0.0

Constructor & Destructor Documentation

◆ CaseParamsParserBasic()

gqmps2::CaseParamsParserBasic::CaseParamsParserBasic ( const char *  file)
inline

Create simulation case parameters parser.

Read the input file as a JSON file and parse the contained simulation case parameters JSON object.

Parameters
filePath of the to be parsed file. For example, argv[1].
Since
version 0.0.0

Member Function Documentation

◆ ParseBool()

bool gqmps2::CaseParamsParserBasic::ParseBool ( const std::string &  item)
inline

Parse a bool parameter.

Parameters
itemParameter key.

◆ ParseChar()

char gqmps2::CaseParamsParserBasic::ParseChar ( const std::string &  item)
inline

Parse a char parameter.

Parameters
itemParameter key.

◆ ParseDouble()

double gqmps2::CaseParamsParserBasic::ParseDouble ( const std::string &  item)
inline

Parse a float parameter.

Parameters
itemParameter key.

◆ ParseInt()

int gqmps2::CaseParamsParserBasic::ParseInt ( const std::string &  item)
inline

Parse a int parameter.

Parameters
itemParameter key.

◆ ParseStr()

std::string gqmps2::CaseParamsParserBasic::ParseStr ( const std::string &  item)
inline

Parse a std::string parameter.

Parameters
itemParameter key.

The documentation for this class was generated from the following file: