CASM  1.1.0
A Clusters Approach to Statistical Mechanics
DataFormatter.hh
Go to the documentation of this file.
1 #ifndef CASM_DataFormatter
2 #define CASM_DataFormatter
3 
4 #include <functional>
5 #include <iostream>
6 #include <sstream>
7 #include <string>
8 #include <vector>
9 
16 #include "casm/misc/CASM_math.hh"
18 
19 namespace CASM {
20 
54 
60 
61 // Given multi-dimensional index expression string such as
62 // "3:7, :, 5"
63 // splits expresion and returns a pair of vectors containing lower and upper
64 // bounds that can be counted over to expand index expression into a set of
65 // indices. a standalone ':' character is converted to the special index value
66 // of -1 to indicate that all indices are to be counted over in that dimension
67 // The result for the example case yields the pair
68 // {{3, -1, 5}, {7, -1 5}}
69 // commas must be present as delimitters between expressions. Whitespace is
70 // ignored.
71 std::pair<std::vector<long>, std::vector<long> > index_expression_to_bounds(
72  const std::string &_expr);
73 
74 // Given expression string
75 // "subexpr1 subexpr2(subsub1) subexpr3(subsub2(subsubsub1))"
76 // splits expresion so that
77 // tag_names = {"subexpr1", "subexpr2", "subexpr3"}
78 // sub_exprs = {"","subsub1", "subsub2(subsubsub1)"}
79 // whitespace and commas are ignored
80 void split_formatter_expression(const std::string &input_expr,
81  std::vector<std::string> &tag_names,
82  std::vector<std::string> &sub_exprs);
83 
84 // Given expression string
85 // "subexpr1 subexpr2(subsub1) subexpr3(subsub2(subsubsub1))"
86 // splits expresion so that
87 // tag_names = {"subexpr1", "subexpr2", "subexpr3"}
88 // sub_exprs = {"","subsub1", "subsub2(subsubsub1)"}
89 // whitespace and commas are ignored
90 void split_formatter_expression(const std::string &input_expr,
91  std::vector<std::string> &tag_names,
92  std::vector<std::string> &sub_exprs);
93 
167 template <typename _DataObject>
169  // These are private classes that sweeten the I/O syntax
170  // they have to be forward declared ahead of DataFormatter::operator()
171  template <typename IteratorType>
172  class FormattedIteratorPair;
173 
174  class FormattedObject;
175 
176  public:
177  typedef _DataObject DataObject;
178 
179  DataFormatter(int _sep = 4, int _precision = 12, std::string _comment = "#")
180  : m_initialized(false),
181  m_prec(_precision),
182  m_sep(_sep),
183  m_indent(0),
184  m_comment(_comment) {
185  m_data_formatters.reserve(100);
186  }
187 
188  template <typename... Args>
189  DataFormatter(const Args &... formatters) : DataFormatter() {
190  push_back(formatters...);
191  }
192 
193  bool empty() const { return m_data_formatters.size() == 0; }
194 
195  void clear() { m_data_formatters.clear(); }
196 
197  template <typename IteratorType>
199  IteratorType end) const {
200  return FormattedIteratorPair<IteratorType>(this, begin, end);
201  }
202 
203  void set_indent(int _indent) {
204  if (m_col_width.size() == 0) return;
205  m_col_width[0] += _indent;
206  m_col_sep[0] += _indent;
207  // m_indent=_indent;
208  }
209 
210  FormattedObject operator()(const DataObject &data_obj) const {
211  return FormattedObject(this, data_obj);
212  }
213 
215  bool validate(const DataObject &_obj) const;
216 
218  void inject(const DataObject &_obj, DataStream &_stream) const;
219 
221  template <typename ValueType>
222  ValueType evaluate_as_scalar(const DataObject &_obj) const;
223 
225  template <typename ValueType>
226  std::vector<ValueType> evaluate_as_vector(const DataObject &_obj) const;
227 
229  Eigen::MatrixXd evaluate_as_matrix(const DataObject &_obj) const;
230 
232  template <typename ValueType, typename IteratorType>
233  std::vector<ValueType> evaluate_as_vector(IteratorType begin,
234  IteratorType end) const;
235 
237  template <typename IteratorType>
238  Eigen::MatrixXd evaluate_as_matrix(IteratorType begin,
239  IteratorType end) const;
240 
242  void print(const DataObject &_obj, std::ostream &_stream) const;
243 
246  jsonParser &to_json(const DataObject &_obj, jsonParser &json) const;
247 
250  jsonParser &to_json_arrays(const DataObject &_obj, jsonParser &json) const;
251 
253  void print_header(const DataObject &_tmplt_obj, std::ostream &_stream) const;
254 
256  std::vector<std::string> col_header(const DataObject &_template_obj) const;
257 
261  void push_back(const BaseDatumFormatter<DataObject> &new_formatter,
262  const std::string &args) {
263  // //If the last formatter matches new_formatter, try to parse the new
264  // arguments into it if(m_data_formatters.size() > 0 &&
265  // m_data_formatters.back()->name() == new_formatter.name()) {
266  // if(m_data_formatters.back()->parse_args(args)) {
267  // return;
268  // }
269  // }
270 
271  m_data_formatters.emplace_back(new_formatter.clone());
272  m_col_sep.push_back(0);
273  m_col_width.push_back(0);
274  m_data_formatters.back()->parse_args(args);
275  }
276 
277  void push_back(const BaseDatumFormatter<DataObject> &new_formatter) {
278  m_data_formatters.emplace_back(new_formatter.clone());
279  m_col_sep.push_back(0);
280  m_col_width.push_back(0);
281  }
282 
283  template <typename... Args>
284  void push_back(const BaseDatumFormatter<DataObject> &new_formatter,
285  const Args &... formatters) {
286  push_back(new_formatter);
287  push_back(formatters...);
288  }
289 
290  void append(const DataFormatter<DataObject> &_tail) {
291  for (const auto &frmtr : _tail.m_data_formatters) push_back(*frmtr);
292  }
293 
295  const BaseDatumFormatter<DataObject> &new_formatter) {
296  push_back(new_formatter);
297  return *this;
298  }
299 
300  void set_header_prefix(const std::string &_prefix) { m_comment += _prefix; }
301 
302  bool initialize(const DataObject &_tmplt) const;
303 
304  private:
305  mutable bool m_initialized;
306  // List of all the ConfigFormatter objects you want outputted
307  std::vector<notstd::cloneable_ptr<BaseDatumFormatter<DataObject> > >
309  mutable std::vector<Index> m_col_sep;
310  mutable std::vector<Index> m_col_width;
311  // Decimal precision
312  int m_prec;
313  // number of spaces between columns
314  int m_sep;
315 
316  int m_indent;
317  // comment prefix -- default to "#"
318  std::string m_comment;
319 };
320 
322 
331 template <typename _DataObject>
333  public:
334  typedef _DataObject DataObject;
335  typedef long difference_type;
338 
339  BaseDatumFormatter(const std::string &_init_name, const std::string &_desc)
340  : m_name(_init_name), m_description(_desc) {}
341 
343  virtual ~BaseDatumFormatter(){};
344 
347  const std::string &name() const { return m_name; }
348 
352  const std::string &description() const { return m_description; }
353 
354  virtual DatumFormatterClass type() const {
356  }
357 
360  const DictType &home() const { return *m_home; }
361 
364  void set_home(const DictType &home) const { m_home = &home; }
365 
369  std::unique_ptr<BaseDatumFormatter<DataObject> > clone() const {
370  return std::unique_ptr<BaseDatumFormatter<DataObject> >(this->_clone());
371  }
372 
376  virtual bool init(const DataObject &_template_obj) const { return true; };
377 
381  virtual bool validate(const DataObject &_data_obj) const { return true; }
382 
389  virtual std::vector<std::string> col_header(
390  const DataObject &_template_obj) const {
391  return std::vector<std::string>{this->short_header(_template_obj)};
392  }
393 
399  virtual std::string long_header(const DataObject &_template_obj) const {
400  auto _col = col_header(_template_obj);
401  if (_col.size() == 1) {
402  return _col[0];
403  }
404 
405  std::stringstream t_ss;
406  for (Index i = 0; i < _col.size(); i++) {
407  t_ss << " " << _col[i];
408  }
409 
410  return t_ss.str();
411  }
412 
417  virtual std::string short_header(const DataObject &_template_obj) const {
418  return name();
419  };
420 
424  virtual Index num_passes(const DataObject &_data_obj) const { return 1; }
425 
429  virtual void print(const DataObject &_data_obj, std::ostream &_stream,
430  Index pass_index = 0) const = 0;
431 
435  virtual void inject(const DataObject &_data_obj, DataStream &_stream,
436  Index pass_index = 0) const = 0;
437 
446  virtual jsonParser &to_json(const DataObject &_data_obj,
447  jsonParser &json) const = 0;
448 
456  virtual bool parse_args(const std::string &args) { return args.size() == 0; }
457 
458  protected:
460 
470  void _parse_index_expression(const std::string &_expr);
471 
472  void _add_rule(const std::vector<Index> &new_rule) const {
473  m_index_rules.push_back(new_rule);
474  }
475 
476  const IndexContainer &_index_rules() const { return m_index_rules; }
477 
478  private:
482  virtual BaseDatumFormatter *_clone() const = 0;
485  std::string m_name;
486  std::string m_description;
488  mutable const DictType *m_home;
489 };
490 
491 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
492 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
498  // Couldn't figure out how to get compiler to correctly substitute names
499  // virtual "FormattedPrintable" class is a workaround
500 
501  public:
502  virtual ~FormattedPrintable() {}
503  virtual void inject(DataStream &stream) const = 0;
504  virtual void print(std::ostream &stream) const = 0;
505  virtual jsonParser &to_json(jsonParser &json) const = 0;
506 };
507 
508 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
509 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
510 
516 template <typename DataObject>
517 template <typename IteratorType>
519  : public FormattedPrintable {
521  IteratorType m_begin_it, m_end_it;
522 
523  public:
525  IteratorType _begin, IteratorType _end)
526  : m_formatter_ptr(_formatter_ptr), m_begin_it(_begin), m_end_it(_end) {}
527 
528  void inject(DataStream &_stream) const {
529  if (m_begin_it == m_end_it) return;
530  // hack: always print header to initialize things, like Clexulator, but in
531  // this case throw it away
532  std::stringstream _ss;
533  m_formatter_ptr->print_header(*m_begin_it, _ss);
534  for (IteratorType it(m_begin_it); it != m_end_it; ++it)
535  m_formatter_ptr->inject(*it, _stream);
536  }
537 
538  void print(std::ostream &_stream) const {
539  if (m_begin_it == m_end_it) return;
540 
541  FormatFlag format(_stream);
542  if (format.print_header()) {
543  m_formatter_ptr->print_header(*m_begin_it, _stream);
544  } else { // hack: always print header to initialize things, like
545  // Clexulator, but in this case throw it away
546  std::stringstream _ss;
547  m_formatter_ptr->print_header(*m_begin_it, _ss);
548  }
549  format.print_header(false);
550  _stream << format;
551  for (IteratorType it(m_begin_it); it != m_end_it; ++it)
552  m_formatter_ptr->print(*it, _stream);
553  }
554 
555  jsonParser &to_json(jsonParser &json) const {
556  json.put_array();
557  for (IteratorType it(m_begin_it); it != m_end_it; ++it)
558  json.push_back((*m_formatter_ptr)(*it));
559  return json;
560  }
561 
564  json = jsonParser::object();
565  for (IteratorType it(m_begin_it); it != m_end_it; ++it)
566  m_formatter_ptr->to_json_arrays(*it, json);
567  return json;
568  }
569 };
570 
571 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
572 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
573 
579 template <typename DataObject>
583 
584  public:
586  const DataObject &_obj)
587  : m_formatter_ptr(_formatter_ptr), m_obj_ptr(&_obj) {}
588 
589  void inject(DataStream &_stream) const {
590  m_formatter_ptr->inject(*m_obj_ptr, _stream);
591  }
592 
593  void print(std::ostream &_stream) const {
594  FormatFlag format(_stream);
595  if (format.print_header())
596  m_formatter_ptr->print_header(*m_obj_ptr, _stream);
597  format.print_header(false);
598  _stream << format;
599 
600  m_formatter_ptr->print(*m_obj_ptr, _stream);
601  }
602 
603  jsonParser &to_json(jsonParser &json) const {
604  m_formatter_ptr->to_json(*m_obj_ptr, json);
605  return json;
606  }
607 };
608 
609 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
610 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
611 
612 template <typename DataObject, typename DatumFormatterType>
614  typedef DatumFormatterType formatter;
615 
616  // performs a static_cast of value.clone().unique().release()
617  // (i.e. a BaseDatumFormatter*) to formatter*
618 
620  return notstd::cloneable_ptr<formatter>(value.clone());
621  }
622 };
623 
624 /*
625 template<typename DataObject>
626 struct DictionaryConverter<DataObject, BaseDatumFormatter<DataObject> > {
627 
628  typedef BaseDatumFormatter<DataObject> formatter;
629 
630  notstd::cloneable_ptr<formatter> operator()(const formatter &value) {
631  return notstd::cloneable_ptr<formatter>(value.clone());
632  }
633 
634 };
635 */
636 
642 template <
643  typename _DataObject,
644  typename _DatumFormatterType /* note: = BaseDatumFormatter<_DataObject> */>
646  : public notstd::unique_cloneable_map<std::string, _DatumFormatterType> {
647  public:
648  typedef _DataObject DataObject;
649  typedef _DatumFormatterType DatumFormatterType;
657 
659  : UniqueMapType(
660  [](const value_type &value) -> std::string { return value.name(); },
662 
663  /*
665  explicit DataFormatterDictionary(const value_type& formatter) :
666  DataFormatterDictionary() {
667  insert(formatter);
668  }
669 
671  template<typename... Formatters>
672  explicit DataFormatterDictionary(const Formatters&... more) :
673  DataFormatterDictionary() {
674  insert(more...);
675  }
676 
678  DataFormatterDictionary(const DataFormatterDictionary& dict) :
679  UniqueMapType(dict) {
680  }
681 
683  template<typename... Formatters>
684  DataFormatterDictionary(const Formatters&... more) :
685  DataFormatterDictionary() {
686  insert(more...);
687  }
688  */
689 
690  using UniqueMapType::insert;
691 
694  const_iterator lookup(const key_type &_name) const;
695 
697  bool contains(const key_type &_name) const {
698  return this->find(_name) != this->end();
699  }
700 
701  void print_help(std::ostream &_stream, DatumFormatterClass ftype,
702  int width = 60, int separation = 8) const;
703 
705  DataFormatter<DataObject> parse(const std::string &input) const;
706 
708  DataFormatter<DataObject> parse(const std::vector<std::string> &input) const;
709 
712  std::initializer_list<std::string> input) const;
713 };
714 
715 // ******************************************************************************
716 
719 template <typename DataObject>
720 DataFormatterDictionary<DataObject> make_attribute_dictionary();
721 
723 template <typename DataObject>
724 DataFormatterDictionary<DataObject> make_operator_dictionary();
725 
731 template <typename DataObject>
734  dict.insert(make_attribute_dictionary<DataObject>(),
735  make_operator_dictionary<DataObject>());
736 
737  return dict;
738 }
739 
740 // ******************************************************************************
741 
742 inline jsonParser &to_json(const FormattedPrintable &_obj, jsonParser &json) {
743  return _obj.to_json(json);
744 }
745 
746 // ******************************************************************************
747 inline std::ostream &operator<<(std::ostream &_stream,
748  const FormattedPrintable &_formatted) {
749  _formatted.print(_stream);
750  return _stream;
751 }
752 
753 // ******************************************************************************
755  const FormattedPrintable &_formatted) {
756  _formatted.inject(_stream);
757  return _stream;
758 }
759 
760 } // namespace CASM
761 
762 #endif
virtual void inject(const DataObject &_data_obj, DataStream &_stream, Index pass_index=0) const =0
virtual BaseDatumFormatter * _clone() const =0
Make an exact copy of the formatter (including any initialized members)
void set_home(const DictType &home) const
Set the dictionary containing this formatter, set during DictType::lookup.
void _add_rule(const std::vector< Index > &new_rule) const
const DictType & home() const
const Access the dictionary containing this formatter, set during DictType::lookup
DataFormatterDictionary< DataObject, BaseDatumFormatter< DataObject > > DictType
void _parse_index_expression(const std::string &_expr)
IndexContainer m_index_rules
virtual std::string long_header(const DataObject &_template_obj) const
Returns a long expression for each scalar produced by the formatter parsing the long_header should re...
std::unique_ptr< BaseDatumFormatter< DataObject > > clone() const
Make an exact copy of the formatter (including any initialized members)
multivector< Index >::X< 2 > IndexContainer
virtual std::vector< std::string > col_header(const DataObject &_template_obj) const
Returns a header string for each scalar produced by the formatter parsing the entries in the col_head...
virtual bool init(const DataObject &_template_obj) const
Perform all initialization steps using _template_obj. Returns true if initialization is successful an...
const IndexContainer & _index_rules() const
virtual Index num_passes(const DataObject &_data_obj) const
virtual DatumFormatterClass type() const
virtual jsonParser & to_json(const DataObject &_data_obj, jsonParser &json) const =0
const DictType * m_home
virtual std::string short_header(const DataObject &_template_obj) const
Returns a short expression for the formatter parsing the short_header should allow the formatter to b...
virtual ~BaseDatumFormatter()
Allow polymorphic deletion.
BaseDatumFormatter(const std::string &_init_name, const std::string &_desc)
const std::string & name() const
Returns a name for the formatter, which becomes the tag used for parsing.
virtual bool validate(const DataObject &_data_obj) const
Returns true if _data_obj has valid values for requested data.
virtual void print(const DataObject &_data_obj, std::ostream &_stream, Index pass_index=0) const =0
virtual bool parse_args(const std::string &args)
const std::string & description() const
Returns a short description of the formatter and its allowed arguments (if any). This description is ...
Implements generic formatting member functions for ranges of data objects.
jsonParser & to_json(jsonParser &json) const
DataFormatter< DataObject > const * m_formatter_ptr
void inject(DataStream &_stream) const
void print(std::ostream &_stream) const
jsonParser & to_json_arrays(jsonParser &json) const
Output data with format {"name1":[..., x], "name2":[..., x], ...}.
FormattedIteratorPair(const DataFormatter< DataObject > *_formatter_ptr, IteratorType _begin, IteratorType _end)
Implements generic formatting member functions for individual data objects.
FormattedObject(const DataFormatter< DataObject > *_formatter_ptr, const DataObject &_obj)
void print(std::ostream &_stream) const
void inject(DataStream &_stream) const
DataFormatter< DataObject > const * m_formatter_ptr
jsonParser & to_json(jsonParser &json) const
Parsing dictionary for constructing a DataFormatter<DataObject> object.
bool contains(const key_type &_name) const
True if dictionary contains entry for.
UniqueMapType::key_type key_type
UniqueMapType::iterator iterator
notstd::unique_cloneable_map< std::string, DatumFormatterType > UniqueMapType
std::pair< iterator, bool > insert(const value_type &value)
Insert single value.
Definition: unique_map.hh:149
UniqueMapType::const_iterator const_iterator
UniqueMapType::value_type value_type
UniqueMapType::size_type size_type
_DatumFormatterType DatumFormatterType
Extract data from objects of 'DataObject' class.
std::vector< ValueType > evaluate_as_vector(const DataObject &_obj) const
Useful when formatted output can be represented as std::vector.
Eigen::MatrixXd evaluate_as_matrix(const DataObject &_obj) const
Useful when formatted output can be represented as Eigen::MatrixXd.
void push_back(const BaseDatumFormatter< DataObject > &new_formatter, const std::string &args)
void print(const DataObject &_obj, std::ostream &_stream) const
Output data as specified by *this of the given DataObject.
jsonParser & to_json(const DataObject &_obj, jsonParser &json) const
void print_header(const DataObject &_tmplt_obj, std::ostream &_stream) const
print the header, using _tmplt_obj to inspect array sizes, etc.
DataFormatter< DataObject > & operator<<(const BaseDatumFormatter< DataObject > &new_formatter)
FormattedObject operator()(const DataObject &data_obj) const
void push_back(const BaseDatumFormatter< DataObject > &new_formatter, const Args &... formatters)
DataFormatter(const Args &... formatters)
void inject(const DataObject &_obj, DataStream &_stream) const
Output selected data from DataObject to DataStream.
ValueType evaluate_as_scalar(const DataObject &_obj) const
Useful when formatted output can be represented as single value.
FormattedIteratorPair< IteratorType > operator()(IteratorType begin, IteratorType end) const
std::vector< notstd::cloneable_ptr< BaseDatumFormatter< DataObject > > > m_data_formatters
bool initialize(const DataObject &_tmplt) const
void set_indent(int _indent)
std::vector< std::string > col_header(const DataObject &_template_obj) const
Returns all column header strings as std::vector<std::string>
std::vector< Index > m_col_sep
std::vector< Index > m_col_width
void set_header_prefix(const std::string &_prefix)
_DataObject DataObject
bool validate(const DataObject &_obj) const
Returns true if _obj has valid data for all portions of query.
DataFormatter(int _sep=4, int _precision=12, std::string _comment="#")
void append(const DataFormatter< DataObject > &_tail)
jsonParser & to_json_arrays(const DataObject &_obj, jsonParser &json) const
void push_back(const BaseDatumFormatter< DataObject > &new_formatter)
bool print_header() const
Definition: FormatFlag.hh:31
Abstract base class to enable generic formatting.
virtual jsonParser & to_json(jsonParser &json) const =0
virtual void print(std::ostream &stream) const =0
virtual void inject(DataStream &stream) const =0
static jsonParser object()
Returns an empty json object.
Definition: jsonParser.hh:395
jsonParser & put_array()
Puts new empty JSON array.
Definition: jsonParser.hh:362
An iterator over a UniqueMap.
Definition: unique_map.hh:19
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
std::map wrapper to enforce a 1-1 ValueType->KeyType relationship
Definition: unique_map.hh:124
MapType::size_type size_type
Definition: unique_map.hh:141
ValueType value_type
Definition: unique_map.hh:126
jsonParser & push_back(const T &value, Args &&... args)
Definition: jsonParser.hh:684
Main CASM namespace.
Definition: APICommand.hh:8
std::pair< std::vector< long >, std::vector< long > > index_expression_to_bounds(const std::string &_expr)
Eigen::MatrixXd MatrixXd
DataStream & operator<<(DataStream &_stream, const FormattedPrintable &_formatted)
DatumFormatterClass
DataFormatterDictionary< DataObject > make_operator_dictionary()
Dictionary of all DatumFormatterOperator.
void split_formatter_expression(const std::string &input_expr, std::vector< std::string > &tag_names, std::vector< std::string > &sub_exprs)
GenericDatumFormatter< std::string, DataObject > name()
DataFormatterDictionary< DataObject > make_dictionary()
Template to can be specialized for constructing dictionaries for particular DataObject.
Iterator find(Iterator begin, Iterator end, const T &value, BinaryCompare q)
Equivalent to std::find(begin, end, value), but with custom comparison.
Definition: algorithm.hh:16
DataFormatterDictionary< DataObject > make_attribute_dictionary()
Dictionary of all AttributeFormatter (i.e. BaseValueFormatter<V, DataObject>)
jsonParser & to_json(const FormattedPrintable &_obj, jsonParser &json)
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
void parse(InputParser< ConfigEnumOptions > &parser, std::string method_name, PrimClex const &primclex, DataFormatterDictionary< Configuration > const &dict)
Definition: stream_io.hh:24
DatumFormatterType formatter
notstd::cloneable_ptr< formatter > operator()(const formatter &value)
Shortcut for multidimensional vector (std::vector< std::vector< ...)
Definition: multivector.hh:26