Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
PLMD::KernelFunctions Class Reference

#include <KernelFunctions.h>

Public Member Functions

 KernelFunctions (const std::string &input, const bool &normed)
 
 KernelFunctions (const std::vector< double > &at, const std::vector< double > &sig, const std::string &type, const bool multivariate, const double &w, const bool norm)
 
unsigned ndim () const
 Get the dimensionality of the kernel. More...
 
double getCutoff (const double &width) const
 Get the cutoff for a kernel. More...
 
std::vector< double > getCenter () const
 Get the position of the center. More...
 
std::vector< unsigned > getSupport (const std::vector< double > &dx) const
 Get the support. More...
 
std::vector< double > getContinuousSupport () const
 get it in continuous form More...
 
double evaluate (const std::vector< Value *> &pos, std::vector< double > &derivatives, bool usederiv=true, bool doInt=false, double lowI_=-1, double uppI_=-1) const
 Evaluate the kernel function with constant intervals. More...
 

Static Public Member Functions

static KernelFunctionsread (IFile *ifile, const std::vector< std::string > &valnames)
 Read a kernel function from a file. More...
 

Private Types

enum  { gaussian, uniform, triangular }
 What type of kernel are we using. More...
 

Private Member Functions

void setData (const std::vector< double > &at, const std::vector< double > &sig, const std::string &type, const bool multivariate, const double &w, const bool norm)
 Used to set all the data in the kernel during construction - avoids double coding as this has two constructors. More...
 
Matrix< double > getMatrix () const
 Convert the width into matrix form. More...
 

Private Attributes

bool diagonal
 Is the metric matrix diagonal. More...
 
enum PLMD::KernelFunctions:: { ... }  ktype
 What type of kernel are we using. More...
 
std::vector< double > center
 The center of the kernel function. More...
 
std::vector< double > width
 The width of the kernel. More...
 
double height
 The height of the kernel. More...
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

What type of kernel are we using.

Enumerator
gaussian 
uniform 
triangular 

Constructor & Destructor Documentation

◆ KernelFunctions() [1/2]

PLMD::KernelFunctions::KernelFunctions ( const std::string &  input,
const bool &  normed 
)

◆ KernelFunctions() [2/2]

PLMD::KernelFunctions::KernelFunctions ( const std::vector< double > &  at,
const std::vector< double > &  sig,
const std::string &  type,
const bool  multivariate,
const double &  w,
const bool  norm 
)

Member Function Documentation

◆ evaluate()

double PLMD::KernelFunctions::evaluate ( const std::vector< Value *> &  pos,
std::vector< double > &  derivatives,
bool  usederiv = true,
bool  doInt = false,
double  lowI_ = -1,
double  uppI_ = -1 
) const

Evaluate the kernel function with constant intervals.

◆ getCenter()

std::vector< double > PLMD::KernelFunctions::getCenter ( ) const
inline

Get the position of the center.

◆ getContinuousSupport()

std::vector< double > PLMD::KernelFunctions::getContinuousSupport ( ) const

get it in continuous form

◆ getCutoff()

double PLMD::KernelFunctions::getCutoff ( const double &  width) const

Get the cutoff for a kernel.

◆ getMatrix()

Matrix< double > PLMD::KernelFunctions::getMatrix ( ) const
inlineprivate

Convert the width into matrix form.

◆ getSupport()

std::vector< unsigned > PLMD::KernelFunctions::getSupport ( const std::vector< double > &  dx) const

Get the support.

◆ ndim()

unsigned PLMD::KernelFunctions::ndim ( ) const
inline

Get the dimensionality of the kernel.

◆ read()

KernelFunctions * PLMD::KernelFunctions::read ( IFile ifile,
const std::vector< std::string > &  valnames 
)
static

Read a kernel function from a file.

◆ setData()

void PLMD::KernelFunctions::setData ( const std::vector< double > &  at,
const std::vector< double > &  sig,
const std::string &  type,
const bool  multivariate,
const double &  w,
const bool  norm 
)
private

Used to set all the data in the kernel during construction - avoids double coding as this has two constructors.

Member Data Documentation

◆ center

std::vector<double> PLMD::KernelFunctions::center
private

The center of the kernel function.

◆ diagonal

bool PLMD::KernelFunctions::diagonal
private

Is the metric matrix diagonal.

◆ height

double PLMD::KernelFunctions::height
private

The height of the kernel.

◆ ktype

enum { ... } PLMD::KernelFunctions::ktype

What type of kernel are we using.

◆ width

std::vector<double> PLMD::KernelFunctions::width
private

The width of the kernel.


The documentation for this class was generated from the following files: