Mojo struct
SVC_Q
@memory_only
struct SVC_Q[k_t: Int]
Aliases
kernel_function = kernel_linear if (k_t == LINEAR) else kernel_poly if (k_t == POLY) else kernel_rbf if (k_t == RBF) else kernel_sigmoid if (k_t == SIGMOID) else kernel_precomputed
Parameters
- k_t (
Int)
Fields
- y (
Optional[UnsafePointer[Int8, MutExternalOrigin]]) - cache (
Cache) - QD (
Optional[UnsafePointer[Float64, MutExternalOrigin]])
Implemented traits
AnyType, ImplicitlyDestructible, QMatrix
Methods
__init__
fn __init__(out self, prob: svm_problem, param: svm_parameter, y_: Optional[UnsafePointer[Int8, MutExternalOrigin]])
Args:
- prob (
svm_problem) - param (
svm_parameter) - y_ (
Optional[UnsafePointer[Int8, MutExternalOrigin]]) - self (
Self)
Returns:
Self
__del__
fn __del__(deinit self)
Args:
- self (
Self)
get_Q
fn get_Q(mut self, i: Int, _len: Int) -> Optional[UnsafePointer[Float32, MutExternalOrigin]]
Args:
- self (
Self) - i (
Int) - _len (
Int)
Returns:
Optional[UnsafePointer[Float32, MutExternalOrigin]]
get_QD
fn get_QD(self) -> Optional[UnsafePointer[Float64, MutExternalOrigin]]
Args:
- self (
Self)
Returns:
Optional[UnsafePointer[Float64, MutExternalOrigin]]
swap_index
fn swap_index(mut self, i: Int, j: Int)
Args:
- self (
Self) - i (
Int) - j (
Int)