make default params available to serde (#167)
* add seed param to search params * make default params available to serde * lints * create defaults for enums * lint
This commit is contained in:
@@ -58,6 +58,12 @@ pub enum KNNWeightFunction {
|
||||
Distance,
|
||||
}
|
||||
|
||||
impl Default for KNNWeightFunction {
|
||||
fn default() -> Self {
|
||||
KNNWeightFunction::Uniform
|
||||
}
|
||||
}
|
||||
|
||||
impl KNNWeightFunction {
|
||||
fn calc_weights<T: RealNumber>(&self, distances: Vec<T>) -> std::vec::Vec<T> {
|
||||
match *self {
|
||||
|
||||
Reference in New Issue
Block a user