16 #ifndef MLPACK_CORE_KERNELS_PSPECTRUM_STRING_KERNEL_HPP    17 #define MLPACK_CORE_KERNELS_PSPECTRUM_STRING_KERNEL_HPP    89   template<
typename VecType>
    90   double Evaluate(
const VecType& a, 
const VecType& b) 
const;
    93   const std::vector<std::vector<std::map<std::string, int> > >& 
Counts()
 const    96   std::vector<std::vector<std::map<std::string, int> > >& 
Counts()
   100   size_t P()
 const { 
return p; }
   102   size_t& 
P() { 
return p; }
   107   std::vector<std::vector<std::map<std::string, int> > > counts;
   117 #include "pspectrum_string_kernel_impl.hpp" size_t & P()
Modify the value of p. 
 
Linear algebra utility functions, generally performed on matrices or vectors. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
size_t P() const
Access the value of p. 
 
The p-spectrum string kernel. 
 
double Evaluate(const VecType &a, const VecType &b) const
Evaluate the kernel for the string indices given. 
 
std::vector< std::vector< std::map< std::string, int > > > & Counts()
Modify the lists of substrings. 
 
PSpectrumStringKernel(const std::vector< std::vector< std::string > > &datasets, const size_t p)
Initialize the PSpectrumStringKernel with the given string datasets. 
 
const std::vector< std::vector< std::map< std::string, int > > > & Counts() const
Access the lists of substrings.