Parse input strings to numerical values. Can resolve simple multiplications and sqrt() expressions.  
More...
#include <iostream>
#include <sstream>
#include "boost/regex.hpp"
#include "lib/Log.hpp"
 
Go to the source code of this file.
 | 
| double  | InputParser::stringToDouble (const std::string &input) | 
|   | Parse input string to double. Resolves simple multiplications, divisions and sqrt() expressions. Input may involve terms of the form x*x, x/x, sqrt(x), and longer compositions thereof, where x is a decimal number.  More...
  | 
|   | 
| float  | InputParser::stringToFloat (const std::string &input) | 
|   | Parse input string to double. Resolves simple multiplications, divisions and sqrt() expressions. Input may involve terms of the form x*x, x/x, and sqrt(x), where x is a decimal number.  More...
  | 
|   | 
Parse input strings to numerical values. Can resolve simple multiplications and sqrt() expressions. 
- Author
 - Finn Lasse Buessen 
 
- Copyright
 - Copyright (c) 2020 
 
 
◆ stringToDouble()
  
  
      
        
          | double InputParser::stringToDouble  | 
          ( | 
          const std::string &  | 
          input | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Parse input string to double. Resolves simple multiplications, divisions and sqrt() expressions. Input may involve terms of the form x*x, x/x, sqrt(x), and longer compositions thereof, where x is a decimal number. 
- Parameters
 - 
  
  
 
- Returns
 - double Parsed numerical value. 
 
 
 
◆ stringToFloat()
  
  
      
        
          | float InputParser::stringToFloat  | 
          ( | 
          const std::string &  | 
          input | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Parse input string to double. Resolves simple multiplications, divisions and sqrt() expressions. Input may involve terms of the form x*x, x/x, and sqrt(x), where x is a decimal number. 
- Parameters
 - 
  
  
 
- Returns
 - float Parsed numerical value.