pub struct Multiquadric {
pub c: f64,
}Expand description
The Multiquadric Kernel.
k(x,y) = sqrt(||x-y||2 + c2)
Fields§
§c: f64Constant added to square of difference.
Implementations§
Source§impl Multiquadric
impl Multiquadric
Sourcepub fn new(c: f64) -> Multiquadric
pub fn new(c: f64) -> Multiquadric
Constructs a new Multiquadric Kernel.
§Examples
use rusty_machine::learning::toolkit::kernel;
use rusty_machine::learning::toolkit::kernel::Kernel;
// Construct a kernel with c = 2.
let ker = kernel::Multiquadric::new(2.0);
println!("{0}", ker.kernel(&[1.,2.,3.], &[3.,4.,5.]));Trait Implementations§
Source§impl Clone for Multiquadric
impl Clone for Multiquadric
Source§fn clone(&self) -> Multiquadric
fn clone(&self) -> Multiquadric
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Multiquadric
impl Debug for Multiquadric
Source§impl Default for Multiquadric
Constructs a default Multiquadric Kernel.
impl Default for Multiquadric
Constructs a default Multiquadric Kernel.
The defaults are:
- c = 0
Source§fn default() -> Multiquadric
fn default() -> Multiquadric
Returns the “default value” for a type. Read more
Source§impl Kernel for Multiquadric
impl Kernel for Multiquadric
impl Copy for Multiquadric
Auto Trait Implementations§
impl Freeze for Multiquadric
impl RefUnwindSafe for Multiquadric
impl Send for Multiquadric
impl Sync for Multiquadric
impl Unpin for Multiquadric
impl UnwindSafe for Multiquadric
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more