![]() |
Fleet
0.0.9
Inference in the LOT
|
#include <thread>#include <mutex>#include <iostream>#include <fstream>#include <string>#include "OrderedLock.h"#include "Strings.h"#include "Dependencies/CL11.hpp"

Go to the source code of this file.
Macros | |
| #define | TAB <<"\t"<< |
| #define | NL <<"\n"<< |
| #define | ENDL <<std::endl; |
| #define | ENDLL <<"\n"<<std::endl; |
| #define | CERR std::cerr<< |
| #define | COUT std::cout<< |
| #define | COUTT std::cout<<"\t"<< |
| #define | COUTTT std::cout<<"\t\t"<< |
Functions | |
| template<typename FIRST , typename... ARGS> | |
| void | OUTPUTN (std::ostream &o, FIRST f, ARGS... args) |
| This assumes o has been appropriately locked. More... | |
| template<typename FIRST , typename... ARGS> | |
| void | print (FIRST f, ARGS... args) |
| Lock output_lock and print to std:cout. More... | |
| template<typename FIRST , typename... ARGS> | |
| void | ERRN (FIRST f, ARGS... args) |
| Lock err_lock and print to std:cerr. More... | |
| template<typename FIRST , typename... ARGS> | |
| void | DEBUG (FIRST f, ARGS... args) |
| Print to std:ccout with debugging info. More... | |
| template<typename T > | |
| void | save (std::string filename, T &hypotheses) |
| Simple saving of a vector of hypotheses. More... | |
| template<typename HYP > | |
| std::vector< HYP > | load (std::string filename) |
| Simple loading for a vector of hypotheses. More... | |
| std::string | gulp (std::string filename) |
| Read this entire file as a string Skipping comment # lines. More... | |
| template<size_t N> | |
| std::vector< std::array< std::string, N > > | read_csv (const std::string path, bool skipheader, const char delimiter='\t') |
| Load data – divides in columns at the delimiter. NOTE: we are required to say whether we skip a header (first line) or not. Checks tha tthere are exactly N on each line. So we can use like: for(auto [b1, b2, b3, b4, c] : read_csv<5>(FleetArgs::input_path, true)) { .... }. More... | |
Variables | |
| const std::string | OUTPUT_SEP = "\t" |
| OrderedLock | output_lock |
| OrderedLock | err_lock |
| #define CERR std::cerr<< |
| #define COUT std::cout<< |
| #define COUTT std::cout<<"\t"<< |
| #define COUTTT std::cout<<"\t\t"<< |
| #define ENDL <<std::endl; |
| #define ENDLL <<"\n"<<std::endl; |
| #define NL <<"\n"<< |
| #define TAB <<"\t"<< |
| void DEBUG | ( | FIRST | f, |
| ARGS... | args | ||
| ) |
Print to std:ccout with debugging info.
| f |
| void ERRN | ( | FIRST | f, |
| ARGS... | args | ||
| ) |
Lock err_lock and print to std:cerr.
| f |
| std::string gulp | ( | std::string | filename | ) |
Read this entire file as a string Skipping comment # lines.
| filename |
| std::vector<HYP> load | ( | std::string | filename | ) |
Simple loading for a vector of hypotheses.
| filename | |
| g |
| void OUTPUTN | ( | std::ostream & | o, |
| FIRST | f, | ||
| ARGS... | args | ||
| ) |
This assumes o has been appropriately locked.
| o | |
| f |
| void print | ( | FIRST | f, |
| ARGS... | args | ||
| ) |
Lock output_lock and print to std:cout.
| f |
| std::vector< std::vector< std::string > > read_csv | ( | const std::string | path, |
| bool | skipheader, | ||
| const char | delimiter = '\t' |
||
| ) |
Load data – divides in columns at the delimiter. NOTE: we are required to say whether we skip a header (first line) or not. Checks tha tthere are exactly N on each line. So we can use like: for(auto [b1, b2, b3, b4, c] : read_csv<5>(FleetArgs::input_path, true)) { .... }.
| filename | |
| g |
| void save | ( | std::string | filename, |
| T & | hypotheses | ||
| ) |
Simple saving of a vector of hypotheses.
| filename | |
| hypotheses |
| OrderedLock err_lock |
| OrderedLock output_lock |
| const std::string OUTPUT_SEP = "\t" |
1.8.13