Clhep evaluator class
This presentation is the property of its rightful owner.
Sponsored Links
1 / 5

CLHEP / Evaluator Class PowerPoint PPT Presentation


  • 88 Views
  • Uploaded on
  • Presentation posted in: General

CLHEP / Evaluator Class. Evgueni Tcherniaev IT / API LHC++ meeting CERN, 2 November 2000. New class in CLHEP 1.6. CLHEP 1.6: Alist, String, Combination have been disabled as obsolete;

Download Presentation

CLHEP / Evaluator Class

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Clhep evaluator class

CLHEP / Evaluator Class

Evgueni Tcherniaev

IT / API

LHC++ meeting

CERN, 2 November 2000


New class in clhep 1 6

New class in CLHEP 1.6

  • CLHEP 1.6:

    • Alist, String, Combination have been disabled as obsolete;

    • Added Evaluator of arithmetic expressions with an extendable dictionary.

  • Expression may contain numbers, variables, functions separated by arithmetic (+, -, /, *, ^, **) and logical operators (==, !=, >, >=, <, <=, &&, ||).

  • User can add new variables and functions to the dictionary.


Evaluator member functions i

Evaluator: Member functions I

  • Constructor:

    • HepTool::Evaluator()

  • Main functions:

    • double evaluate(const char* expression)

    • void setVariable(const char* name, double value) void setVariable(const char* name, const char* expression)

    • void setFunction(const char* name, double (*fun)())void setFunction(const char* name, double (*fun)(double))void setFunction(const char* name, double (*fun)(double, double))...


Evaluator member functions ii

Evaluator: Member functions II

  • Other functions:

    • int status()

    • int error_position()

    • void print_error()

    • bool findVariable(const char* name)

    • bool findFunction(const char* name, int npar)

    • void removeVariable(const char* name)

    • void removeFunction(const char* name, int npar)

    • void clear()


Evaluator member functions iii

Evaluator: Member functions III

  • Special functions:

    • void setStdMath()

    • void setSystemOfUnits(double meter = 1, double kilogram = 1, double second = 1, double ampere = 1, double kelvin = 1, double mole = 1, double candela = 1)


  • Login