CASM  1.1.0
A Clusters Approach to Statistical Mechanics
DataFormatter

Detailed Description

Functions and classes related to calculating properties and formatting data.

DataFormatter act on ranges of 'DataObject', extracting or calculating data, and outputting it in various formats (csv, JSON, Eigen::MatrixXd, etc.)

A DataFormatter contains a set of 'DatumFormatter', class methods derived from BaseDatumFormatter, specialized to extract or calculate particular properties. A range of intermediate classes (

See also
Basic Types) exist with the basic implementation details for extracting boolean, scalar, vector, matrix, etc. data, ready to be specialized for a particular property.

DatumFormatters can be constructed and initialized as normal c++ types, but they must also provide an implementation ::BaseDatumFormatter::parse_args that enables initialization from a string command.

The set of DatumFormatter that exist for operating on a particular type of DataObject are stored in a DataFormatterDictionary. The DataFormatterDictionary can parse a string or collection of strings used to specify particular DatumFormatters and any required or optional arguments, and construct and initialize a DataFormatter containing those DatumFormatters. This enables the functionality available through the 'casm query' and 'casm select' commands.

For the set of DatumFormatter available to act on Configuration,

See also
ConfigIO. There currently only exist DatumFormatter that act on Configuration, but DatumFormatter acting on other DataObjects are planned.

Modules

 Basic Types
 Base types for creating data formatters.
 
 DataFormatterOperator
 Operators on other DatumFormatters.
 
 Configuration Queries
 Data formatters that return Configuration properties.
 

Classes

class  CASM::DataFormatter< _DataObject >
 Extract data from objects of 'DataObject' class. More...
 
class  CASM::DataFormatter< _DataObject >::FormattedIteratorPair< IteratorType >
 Implements generic formatting member functions for ranges of data objects. More...
 
class  CASM::DataFormatter< _DataObject >::FormattedObject
 Implements generic formatting member functions for individual data objects. More...
 
class  CASM::FormattedPrintable
 Abstract base class to enable generic formatting. More...
 
class  CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >
 Parsing dictionary for constructing a DataFormatter<DataObject> object. More...
 
class  CASM::Base2DDatumFormatter< Container, DataObject >
 A DatumFormatter that returns a value of specified 2d container. More...
 
class  CASM::DataStream
 
class  CASM::MatrixXdDataStream
 
class  CASM::LabeledMatrixXdDataStream
 

Typedefs

template<typename DataObject >
using CASM::StringAttributeDictionary = DataFormatterDictionary< DataObject, StringAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::BooleanAttributeDictionary = DataFormatterDictionary< DataObject, BooleanAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::IntegerAttributeDictionary = DataFormatterDictionary< DataObject, IntegerAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::ScalarAttributeDictionary = DataFormatterDictionary< DataObject, ScalarAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::VectorXiAttributeDictionary = DataFormatterDictionary< DataObject, VectorXiAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::VectorXdAttributeDictionary = DataFormatterDictionary< DataObject, VectorXdAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
using CASM::MatrixXdAttributeDictionary = DataFormatterDictionary< DataObject, MatrixXdAttribute< DataObject > >
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 

Functions

template<typename DataObject >
StringAttributeDictionary< DataObject > CASM::make_string_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
BooleanAttributeDictionary< DataObject > CASM::make_boolean_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
IntegerAttributeDictionary< DataObject > CASM::make_integer_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
ScalarAttributeDictionary< DataObject > CASM::make_scalar_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
VectorXiAttributeDictionary< DataObject > CASM::make_vectorxi_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
VectorXdAttributeDictionary< DataObject > CASM::make_vectorxd_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
MatrixXdAttributeDictionary< DataObject > CASM::make_matrixxd_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
DataFormatterDictionary< DataObject, BaseValueFormatter< jsonParser, DataObject > > CASM::make_json_dictionary ()
 Template to be specialized for constructing dictionaries for particular DataObject. More...
 
template<typename DataObject >
DatumFormatterAlias< DataObject > CASM::datum_formatter_alias (const std::string &_name, const std::string &_command, const DataFormatterDictionary< DataObject > &_dict, const std::string &_help="")
 Make a DatumFormatterAlias. More...
 
template<typename DataObject >
DatumFormatterAlias< DataObject > CASM::datum_formatter_alias (const std::string &_name, const BaseDatumFormatter< DataObject > &_inside, const std::string &_help="")
 Make a DatumFormatterAlias. More...
 

Typedef Documentation

◆ BooleanAttributeDictionary

template<typename DataObject >
using CASM::BooleanAttributeDictionary = typedef DataFormatterDictionary<DataObject, BooleanAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 105 of file DataFormatterDecl.hh.

◆ IntegerAttributeDictionary

template<typename DataObject >
using CASM::IntegerAttributeDictionary = typedef DataFormatterDictionary<DataObject, IntegerAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 129 of file DataFormatterDecl.hh.

◆ MatrixXdAttributeDictionary

template<typename DataObject >
using CASM::MatrixXdAttributeDictionary = typedef DataFormatterDictionary<DataObject, MatrixXdAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 225 of file DataFormatterDecl.hh.

◆ ScalarAttributeDictionary

template<typename DataObject >
using CASM::ScalarAttributeDictionary = typedef DataFormatterDictionary<DataObject, ScalarAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 153 of file DataFormatterDecl.hh.

◆ StringAttributeDictionary

template<typename DataObject >
using CASM::StringAttributeDictionary = typedef DataFormatterDictionary<DataObject, StringAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 81 of file DataFormatterDecl.hh.

◆ VectorXdAttributeDictionary

template<typename DataObject >
using CASM::VectorXdAttributeDictionary = typedef DataFormatterDictionary<DataObject, VectorXdAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 201 of file DataFormatterDecl.hh.

◆ VectorXiAttributeDictionary

template<typename DataObject >
using CASM::VectorXiAttributeDictionary = typedef DataFormatterDictionary<DataObject, VectorXiAttribute<DataObject> >

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 177 of file DataFormatterDecl.hh.

Function Documentation

◆ datum_formatter_alias() [1/2]

template<typename DataObject >
DatumFormatterAlias<DataObject> CASM::datum_formatter_alias ( const std::string &  _name,
const BaseDatumFormatter< DataObject > &  _inside,
const std::string &  _help = "" 
)

Make a DatumFormatterAlias.

Definition at line 704 of file DataFormatterTools.hh.

◆ datum_formatter_alias() [2/2]

template<typename DataObject >
DatumFormatterAlias<DataObject> CASM::datum_formatter_alias ( const std::string &  _name,
const std::string &  _command,
const DataFormatterDictionary< DataObject > &  _dict,
const std::string &  _help = "" 
)

Make a DatumFormatterAlias.

Definition at line 692 of file DataFormatterTools.hh.

◆ make_boolean_dictionary()

template<typename DataObject >
BooleanAttributeDictionary<DataObject> CASM::make_boolean_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_integer_dictionary()

template<typename DataObject >
IntegerAttributeDictionary<DataObject> CASM::make_integer_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_json_dictionary()

template<typename DataObject >
DataFormatterDictionary<DataObject, BaseValueFormatter<jsonParser, DataObject> > CASM::make_json_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_matrixxd_dictionary()

template<typename DataObject >
MatrixXdAttributeDictionary< DataObject > CASM::make_matrixxd_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

Definition at line 1500 of file DataFormatterTools.hh.

◆ make_scalar_dictionary()

template<typename DataObject >
ScalarAttributeDictionary<DataObject> CASM::make_scalar_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_string_dictionary()

template<typename DataObject >
StringAttributeDictionary<DataObject> CASM::make_string_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_vectorxd_dictionary()

template<typename DataObject >
VectorXdAttributeDictionary<DataObject> CASM::make_vectorxd_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.

◆ make_vectorxi_dictionary()

template<typename DataObject >
VectorXiAttributeDictionary<DataObject> CASM::make_vectorxi_dictionary ( )

Template to be specialized for constructing dictionaries for particular DataObject.