STORMM Source Documentation
Loading...
Searching...
No Matches
ascii_numbers.h
1// -*-c++-*-
2#ifndef STORMM_ASCII_NUMBERS_H
3#define STORMM_ASCII_NUMBERS_H
4
5#include <cmath>
6#include <cstdlib>
7#include <cstring>
8#include <fstream>
9#include <iostream>
10#include <string>
11#include <vector>
12#include "copyright.h"
13#include "polynumeric.h"
14#include "parse.h"
15
16namespace stormm {
17namespace parse {
18
37void printNumberSeries(std::ofstream *foutp, const std::vector<PolyNumeric> &values,
38 const int values_per_line, const int width, const int decimal,
39 const NumberFormat format, const std::string &caller = std::string(""),
40 const std::string &task = std::string(""));
41
42void printNumberSeries(std::ofstream *foutp, const std::vector<PolyNumeric> &values,
43 const int values_per_line, const int width, const NumberFormat format,
44 const std::string &caller = std::string(""),
45 const std::string &task = std::string(""));
47
59std::vector<PolyNumeric> readNumberSeries(const TextFile &tf, const int start_line,
60 const int n_values, const int values_per_line,
61 const int width, const int decimal,
62 const NumberFormat format,
63 const std::string &caller = std::string(""),
64 const std::string &task = std::string(""));
65
81llint readIntegerValue(const char* number_text, int start_index, int number_length);
82
83llint readIntegerValue(const std::string &number_text, int start_index, int number_length);
84
85llint readIntegerValue(const TextFile &tf, int line_idex, int start_index, int number_length);
87
93double readRealValue(const char* number_text, int start_index, int number_length);
94
95double readRealValue(const std::string &number_text, int start_index, int number_length);
96
97double readRealValue(const TextFile &tf, int line_idex, int start_index, int number_length);
99
100} // namespace parse
101} // namespace stormm
102
103#endif
Structure for translating a text file into a compact, rapidly parsable vector of characters in CPU RA...
Definition textfile.h:45