<commit_before>// @(#)root/smatrix:$Name:  $:$Id: Expression.hv 1.0 2005/11/24 12:00:00 moneta Exp $
// Authors: <NAME>, <NAME>    2005  

#ifndef ROOT_Math_Expression
#define ROOT_Math_Expression
// ********************************************************************
//
// source:
//
// type:      source code
//
// created:   19. Mar 2001
//
// author:    <NAME>
//            HERA-B Collaboration
//            Max-Planck-Institut fuer Kernphysik
//            Saupfercheckweg 1
//            69117 Heidelberg
//            Germany
//            E-mail: <EMAIL>
//
// Description: Expression Template Elements for SVector
//
// changes:
// 19 Mar 2001 (TG) creation
// 20 Mar 2001 (TG) added rows(), cols() to Expr
// 21 Mar 2001 (TG) added Expr::value_type
// 11 Apr 2001 (TG) rows(), cols() replaced by rows, cols
// 10 Okt 2001 (TG) added print() and operator<<() for Expr class
//
// ********************************************************************

/** Expr.
    An Expression wrapper class.

    @memo Expr.
    @author <NAME>
*/
//==============================================================================
// Expr: class representing SVector expressions
//=============================================================================

// originally references where used as data members of operation wrappers
// problem appear on Windows because original ref goes out of scope use then by value by default (like in tvmet)
//#define SMATRIX_USE_REFERENCES   


#include <iomanip>


namespace ROOT { 

  namespace Math { 



template <class ExprType, class T, unsigned int D, unsigned int D2 = 0>
class Expr {
public:
  typedef T  value_type;

  ///
  Expr(const ExprType& rhs) :
    rhs_(rhs) {}

  ///
  ~Expr() {}

  ///
  inline T apply(unsigned int i) const {
    return rhs_.apply(i);
  }

#ifdef OLD_IMPL
  ///
  static const unsigned int rows = D;
  ///
  static const unsigned int cols = D2;
#else
  // use enumerations
  enum { 
    ///
    rows = D, 
  ///
    cols = D2,
  };
#endif

  /// used by operator<<()
  std::ostream& print(std::ostream& os) const {
    os.setf(std::ios::right,std::ios::adjustfield);<commit_msg>remove , from last enum member.<commit_after>// @(#)root/smatrix:$Name:  $:$Id: Expression.h,v 1.1 2005/11/24 16:03:42 brun Exp $
// Authors: <NAME>, <NAME>    2005  

#ifndef ROOT_Math_Expression
#define ROOT_Math_Expression
// ********************************************************************
//
// source:
//
// type:      source code
//
// created:   19. Mar 2001
//
// author:    <NAME>
//            HERA-B Collaboration
//            Max-Planck-Institut fuer Kernphysik
//            Saupfercheckweg 1
//            69117 Heidelberg
//            Germany
//            E-mail: <EMAIL>
//
// Description: Expression Template Elements for SVector
//
// changes:
// 19 Mar 2001 (TG) creation
// 20 Mar 2001 (TG) added rows(), cols() to Expr
// 21 Mar 2001 (TG) added Expr::value_type
// 11 Apr 2001 (TG) rows(), cols() replaced by rows, cols
// 10 Okt 2001 (TG) added print() and operator<<() for Expr class
//
// ********************************************************************

/** Expr.
    An Expression wrapper class.

    @memo Expr.
    @author <NAME>
*/
//==============================================================================
// Expr: class representing SVector expressions
//=============================================================================

// originally references where used as data members of operation wrappers
// problem appear on Windows because original ref goes out of scope use then by value by default (like in tvmet)
//#define SMATRIX_USE_REFERENCES   


#include <iomanip>


namespace ROOT { 

  namespace Math { 



template <class ExprType, class T, unsigned int D, unsigned int D2 = 0>
class Expr {
public:
  typedef T  value_type;

  ///
  Expr(const ExprType& rhs) :
    rhs_(rhs) {}

  ///
  ~Expr() {}

  ///
  inline T apply(unsigned int i) const {
    return rhs_.apply(i);
  }

#ifdef OLD_IMPL
  ///
  static const unsigned int rows = D;
  ///
  static const unsigned int cols = D2;
#else
  // use enumerations
  enum { 
    ///
    rows = D, 
  ///
    cols = D2
  };
#endif

  /// used by operator<<()
  std::ostream& print(std::ostream& os) const {
    os.setf(std::ios::right,std::ios::adjustfield);
{'fraction_non_alphanumeric': 0.2556739231125521, 'fraction_numerical': 0.030569708198239925, 'mean_word_length': 2.873542600896861, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4866377', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1247, 'n_words': 405}