Loading...
Searching...
No Matches
PLMD::h5table Namespace Reference

(not "h5": libraries such as ITensor use a global namespace h5) More...

Classes

struct  Field
 A field: name and value. More...
 
class  Reader
 Reads a table as the lines of the equivalent text file. More...
 
struct  Value
 A value of a field. More...
 
class  Writer
 Writes a table: rows are buffered and written in chunks (flush() writes them all) More...
 

Functions

bool available ()
 Tables of fields (the files written with OFile::printField) stored in HDF5 files.
 
bool isH5 (const std::string &path)
 True if the file is an HDF5 table (by its extension, .h5)
 
std::vector< unsigned long long > rows (const std::string &path)
 Number of rows of every block of a table.
 
void truncate (const std::string &path, const std::vector< unsigned long long > &keep, const std::string &backup)
 Keep the first keep[b] rows of block b (the blocks beyond keep.size() are removed).
 

Detailed Description

(not "h5": libraries such as ITensor use a global namespace h5)

Class for input files.

This class provides features similar to those in the standard C "FILE*" type, but only for sequential input. See OFile for sequential output.

Function Documentation

◆ isH5()

bool PLMD::h5table::isH5 ( const std::string & path)

True if the file is an HDF5 table (by its extension, .h5)

◆ rows()

std::vector< unsigned long long > PLMD::h5table::rows ( const std::string & path)

Number of rows of every block of a table.

◆ truncate()

void PLMD::h5table::truncate ( const std::string & path,
const std::vector< unsigned long long > & keep,
const std::string & backup )

Keep the first keep[b] rows of block b (the blocks beyond keep.size() are removed).

The rows removed are written, with the same structure, in the table backup (if not empty).