Registry / utility / vector-space

vector-space

JSON →
library0.5.1rscratesunverified

Generic vector space trait for compatibility across various libraries.

# Cargo.toml [dependencies] vector-space = "0.5.1"
INSTALL
IMPORT
SIG · VECTOR-SPACE
V
vector-space
utilityrustv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

VectorSpace
use vector_space::VectorSpace;

Implements the VectorSpace trait for a custom 2D vector.

use vector_space::VectorSpace; fn main() { // Example: implementing VectorSpace for a custom type struct MyVector(f64, f64); impl VectorSpace for MyVector { type Scalar = f64; fn add(self, other: Self) -> Self { MyVector(self.0 + other.0, self.1 + other.1) } fn scale(self, scalar: Self::Scalar) -> Self { MyVector(self.0 * scalar, self.1 * scalar) } } println!("VectorSpace trait implemented"); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
vector-space — cargo add vector-space · libregistry