BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
Number.h File Reference
#include <cnl/all.h>
#include <limits>
#include <string>
#include <vector>
#include <optional>
#include <functional>
#include "Value.h"

Go to the source code of this file.

Classes

struct  std::hash< BPMNOS_NUMBER_TYPE >
 
struct  BPMNOS::Values
 
struct  BPMNOS::SharedValues
 

Namespaces

namespace  std
 STL namespace.
 
namespace  BPMNOS
 

Macros

#define BPMNOS_NUMBER_REP   int64_t
 
#define BPMNOS_NUMBER_SCALE   16
 
#define BPMNOS_NUMBER_TYPE   cnl::scaled_integer< BPMNOS_NUMBER_REP, cnl::power<-BPMNOS_NUMBER_SCALE> >
 
#define BPMNOS_NUMBER_PRECISION   (1.0 / (1 << BPMNOS_NUMBER_SCALE))
 

Typedefs

typedef BPMNOS_NUMBER_TYPE BPMNOS::number
 
typedef std::unordered_map< std::string, std::optional< number > > BPMNOS::ValueMap
 
typedef std::unordered_map< std::string, std::variant< std::optional< number >, std::string > > BPMNOS::VariedValueMap
 

Functions

double BPMNOS::stod (const std::string &str)
 
int BPMNOS::stoi (const std::string &str)
 
number BPMNOS::to_number (const std::string &valueString, const ValueType &type)
 Converts a string to a number.
 
number BPMNOS::to_number (const Value &value, const ValueType &type)
 Converts a value to a number.
 
std::string BPMNOS::to_string (number numberValue, const ValueType &type)
 Converts a number to a string.
 
BPMNOS::Values BPMNOS::mergeValues (const std::vector< BPMNOS::Values > &valueSets)
 

Macro Definition Documentation

◆ BPMNOS_NUMBER_PRECISION

#define BPMNOS_NUMBER_PRECISION   (1.0 / (1 << BPMNOS_NUMBER_SCALE))

Definition at line 32 of file Number.h.

◆ BPMNOS_NUMBER_REP

#define BPMNOS_NUMBER_REP   int64_t

Definition at line 19 of file Number.h.

◆ BPMNOS_NUMBER_SCALE

#define BPMNOS_NUMBER_SCALE   16

Definition at line 20 of file Number.h.

◆ BPMNOS_NUMBER_TYPE

#define BPMNOS_NUMBER_TYPE   cnl::scaled_integer< BPMNOS_NUMBER_REP, cnl::power<-BPMNOS_NUMBER_SCALE> >

Definition at line 21 of file Number.h.