pub struct VectorStoreConfig {
pub dimension: usize,
pub metric: Metric,
pub segment_max_vectors: usize,
pub compaction_threshold: f32,
pub encoding: EncodingV2,
}Expand description
VectorStore の設定。
§Examples
use alopex_core::vector::{VectorStoreConfig, Metric};
let cfg = VectorStoreConfig { dimension: 128, metric: Metric::Cosine, ..Default::default() };
assert_eq!(cfg.dimension, 128);Fields§
§dimension: usizeベクトル次元。
metric: Metricデフォルトメトリック。
segment_max_vectors: usize1 セグメントあたりの最大ベクトル数。
compaction_threshold: f32将来のコンパクション閾値(現状は設定のみ)。
encoding: EncodingV2ベクトルエンコーディング方式。
Trait Implementations§
Source§impl Clone for VectorStoreConfig
impl Clone for VectorStoreConfig
Source§fn clone(&self) -> VectorStoreConfig
fn clone(&self) -> VectorStoreConfig
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 VectorStoreConfig
impl Debug for VectorStoreConfig
Source§impl Default for VectorStoreConfig
impl Default for VectorStoreConfig
Source§impl<'de> Deserialize<'de> for VectorStoreConfig
impl<'de> Deserialize<'de> for VectorStoreConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VectorStoreConfig
impl RefUnwindSafe for VectorStoreConfig
impl Send for VectorStoreConfig
impl Sync for VectorStoreConfig
impl Unpin for VectorStoreConfig
impl UnwindSafe for VectorStoreConfig
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