MCPcopy Create free account
hub / github.com/Rustixir/darkbird / vec_scaling

Method vec_scaling

src/darkbird/database.rs:122–130  ·  view source on GitHub ↗
(&self, vec_id: &str, scalar: f32)

Source from the content-addressed store, hash-verified

120 /// Performs scalar multiplication of a vector stored in the storage.
121 #[inline]
122 pub fn vec_scaling(&self, vec_id: &str, scalar: f32) -> Result<Option<Vector>, SessionResult> {
123 match self.datastores.get::<VecStorage>() {
124 None => Err(SessionResult::DataStoreNotFound),
125 Some(datastore) => {
126 let res = datastore.vector_scaling(vec_id, scalar);
127 Ok(res)
128 }
129 }
130 }
131
132
133 /// Performs scalar multiplication of a vector stored in the storage.

Callers

nothing calls this directly

Calls 1

vector_scalingMethod · 0.80

Tested by

no test coverage detected