Skip to main content

SvcQ

Struct SvcQ 

Source
pub struct SvcQ<'a> { /* private fields */ }
Expand description

Q matrix for C-SVC and ν-SVC classification.

Q[i][j] = y[i] * y[j] * K(x[i], x[j]) stored as Qfloat (f32).

Implementations§

Source§

impl<'a> SvcQ<'a>

Source

pub fn new(x: &'a [Vec<SvmNode>], param: &SvmParameter, y: &[i8]) -> Self

Trait Implementations§

Source§

impl<'a> QMatrix for SvcQ<'a>

Source§

fn get_q(&mut self, i: usize, len: usize) -> &[Qfloat]

Get column i of the Q matrix, with at least len elements.
Source§

fn get_qd(&self) -> &[f64]

Get the diagonal of Q: QD[i] = Q[i][i].
Source§

fn swap_index(&mut self, i: usize, j: usize)

Swap indices i and j in all internal data structures.

Auto Trait Implementations§

§

impl<'a> Freeze for SvcQ<'a>

§

impl<'a> RefUnwindSafe for SvcQ<'a>

§

impl<'a> Send for SvcQ<'a>

§

impl<'a> Sync for SvcQ<'a>

§

impl<'a> Unpin for SvcQ<'a>

§

impl<'a> UnwindSafe for SvcQ<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.