MeLOn
melon::kernel::KernelCompositeMultiply< T, V > Class Template Reference

Composite kernel which on evaluation multiplies the evaluation results of its subkernels. More...

#include <kernel.h>

Inheritance diagram for melon::kernel::KernelCompositeMultiply< T, V >:
melon::kernel::Kernel< T, V >

Public Member Functions

void add (std::shared_ptr< Kernel< T, V >> kernel)
 Function for adding another subkernel to the composite kernel. More...
 
RET evaluate_kernel (std::vector< T > x1, std::vector< V > x2)
 Function for evalualting the kernel. More...
 
- Public Member Functions inherited from melon::kernel::Kernel< T, V >
virtual ~Kernel ()=default
 Destructor. More...
 

Private Attributes

std::vector< std::shared_ptr< Kernel< T, V > > > children
 

Additional Inherited Members

- Public Types inherited from melon::kernel::Kernel< T, V >
using RET = decltype(std::declval< T >()+std::declval< V >())
 

Detailed Description

template<typename T, typename V>
class melon::kernel::KernelCompositeMultiply< T, V >

Composite kernel which on evaluation multiplies the evaluation results of its subkernels.

Member Function Documentation

◆ add()

template<typename T , typename V >
void melon::kernel::KernelCompositeMultiply< T, V >::add ( std::shared_ptr< Kernel< T, V >>  kernel)
inline

Function for adding another subkernel to the composite kernel.

Parameters
[in]kernelis the subkernel to be added

◆ evaluate_kernel()

template<typename T , typename V >
RET melon::kernel::KernelCompositeMultiply< T, V >::evaluate_kernel ( std::vector< T >  x1,
std::vector< V >  x2 
)
inlinevirtual

Function for evalualting the kernel.

Parameters
[in]x1is a vector containing the first point
[in]x2is a vector containing the second point
Returns
returns the result of the kernel evaluation

Implements melon::kernel::Kernel< T, V >.

Member Data Documentation

◆ children

template<typename T , typename V >
std::vector<std::shared_ptr<Kernel<T, V> > > melon::kernel::KernelCompositeMultiply< T, V >::children
private

Vector containing the subkernels


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