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

Method vec_subtraction

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

Source from the content-addressed store, hash-verified

133 /// Performs scalar multiplication of a vector stored in the storage.
134 #[inline]
135 pub fn vec_subtraction(&self, vec_id: &str, scalar: f32) -> Result<Option<Vector>, SessionResult> {
136 match self.datastores.get::<VecStorage>() {
137 None => Err(SessionResult::DataStoreNotFound),
138 Some(datastore) => {
139 let res = datastore.vector_scaling(vec_id, scalar);
140 Ok(res)
141 }
142 }
143 }
144
145
146

Callers

nothing calls this directly

Calls 1

vector_scalingMethod · 0.80

Tested by

no test coverage detected