pub struct OpqMatrix { /* private fields */ }Implementations§
Source§impl OpqMatrix
impl OpqMatrix
pub fn new(d_in: u32, d_out: u32, m: u32) -> Result<Self>
pub fn verbose(&self) -> bool
pub fn set_verbose(&mut self, verbose: bool)
pub fn niter(&self) -> i32
pub fn set_niter(&mut self, niter: i32)
pub fn niter_pq(&self) -> i32
pub fn set_niter_pq(&mut self, niter: i32)
Trait Implementations§
Source§impl LinearTransform for OpqMatrix
impl LinearTransform for OpqMatrix
fn inner_linear_ptr(&self) -> *mut FaissLinearTransform
fn transform_transpose(&self, n: usize, y: &[f32], x: &mut [f32])
fn set_is_orthonormal(&mut self)
fn have_bias(&self) -> bool
fn is_orthonormal(&self) -> bool
Source§impl VectorTransform for OpqMatrix
impl VectorTransform for OpqMatrix
fn inner_ptr(&self) -> *mut FaissVectorTransform
fn is_trained(&self) -> bool
fn d_in(&self) -> u32
fn d_out(&self) -> u32
fn train(&mut self, n: usize, x: &[f32]) -> Result<()>
fn apply(&self, n: usize, x: &[f32]) -> Result<Vec<f32>>
fn apply_noalloc(&self, n: usize, x: &[f32], xt: &mut [f32])
fn reverse_transform(&self, n: usize, xt: &[f32], x: &mut [f32])
Auto Trait Implementations§
impl Freeze for OpqMatrix
impl RefUnwindSafe for OpqMatrix
impl !Send for OpqMatrix
impl !Sync for OpqMatrix
impl Unpin for OpqMatrix
impl UnsafeUnpin for OpqMatrix
impl UnwindSafe for OpqMatrix
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