68 if (m_precomputed_distance==NULL)
71 SG_REF(m_precomputed_distance);
83 m_precomputed_distance=NULL;
97 if (m_precomputed_distance!=NULL)
98 return m_precomputed_distance->
distance(a, b);
103 void CShiftInvariantKernel::register_params()
109 m_precomputed_distance=NULL;
112 void CShiftInvariantKernel::set_precomputed_distance(
CCustomDistance* precomputed_distance)
114 REQUIRE(precomputed_distance,
"The precomputed distance instance cannot be NULL!\n");
115 SG_REF(precomputed_distance);
117 m_precomputed_distance=precomputed_distance;
120 CCustomDistance* CShiftInvariantKernel::get_precomputed_distance()
const
122 REQUIRE(m_precomputed_distance,
"The precomputed distance instance cannot be NULL!\n");
123 SG_REF(m_precomputed_distance);
124 return m_precomputed_distance;
bool set_triangle_distance_matrix_from_full(const float64_t *dm, int32_t rows, int32_t cols)
virtual ~CShiftInvariantKernel()
virtual EDistanceType get_distance_type()=0
virtual EDistanceType get_distance_type() const
Class SGObject is the base class of all shogun objects.
bool set_full_distance_matrix_from_full(const float64_t *dm, int32_t rows, int32_t cols)
virtual void precompute_distance()
virtual bool init_normalizer()
CFeatures * rhs
feature vectors to occur on right hand side
virtual float64_t distance(int32_t idx_a, int32_t idx_b)
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
virtual float64_t distance(int32_t idx_a, int32_t idx_b) const
SGMatrix< float64_t > get_distance_matrix()
The Custom Distance allows for custom user provided distance matrices.
virtual bool init(CFeatures *l, CFeatures *r)
virtual bool init(CFeatures *lhs, CFeatures *rhs)