FastJet 3.0.2
Public Member Functions
fastjet::FunctionOfPseudoJet< TOut > Class Template Reference

base class providing interface for a generic function of a PseudoJet More...

#include <fastjet/FunctionOfPseudoJet.hh>

Inheritance diagram for fastjet::FunctionOfPseudoJet< TOut >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FunctionOfPseudoJet ()
 default ctor
 FunctionOfPseudoJet (const TOut &constant_value)
 ctor that creates a constant function
virtual ~FunctionOfPseudoJet ()
 default dtor (virtual to allow safe polymorphism)
virtual std::string description () const
 returns a description of the function (an empty string by default)
virtual TOut result (const PseudoJet &pj) const =0
 the action of the function this _has_ to be overloaded in derived classes
TOut operator() (const PseudoJet &pj) const
 apply the function using the "traditional" () operator.
std::vector< TOut > operator() (const std::vector< PseudoJet > &pjs) const
 apply the function on a vector of PseudoJet, returning a vector of the results.

Detailed Description

template<typename TOut>
class fastjet::FunctionOfPseudoJet< TOut >

base class providing interface for a generic function of a PseudoJet

This class serves as a base class to provide a standard interface for a function that returns an object of a given (templated) type that depends on a PseudoJet argument. The rationale for using a class (rather than a pointer to a function) is that a class can be constructed with (and store) additional arguments.

Definition at line 46 of file FunctionOfPseudoJet.hh.


Member Function Documentation

template<typename TOut>
virtual TOut fastjet::FunctionOfPseudoJet< TOut >::result ( const PseudoJet pj) const [pure virtual]
template<typename TOut>
TOut fastjet::FunctionOfPseudoJet< TOut >::operator() ( const PseudoJet pj) const [inline]

apply the function using the "traditional" () operator.

By default, this just calls the apply(...) method above.

Parameters:
pjthe PseudoJet input to the function

Definition at line 69 of file FunctionOfPseudoJet.hh.

template<typename TOut>
std::vector<TOut> fastjet::FunctionOfPseudoJet< TOut >::operator() ( const std::vector< PseudoJet > &  pjs) const [inline]

apply the function on a vector of PseudoJet, returning a vector of the results.

This just calls apply on every PseudoJet in the vector.

Parameters:
pjsthe vector of PseudoJet inputs to the function

Definition at line 75 of file FunctionOfPseudoJet.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends