Vector class

A dense dim-dimensional real vector held as Float32List. The underlying representation matches FAISS on-disk / on-wire so BLOB I/O is a straight memcpy.

Constructors

Vector(Float32List values)
Vector.fromList(List<num> src)
Construct from an iterable of numbers, coercing each to double.
factory
Vector.zero(int d)
Zero-filled vector of length d.
factory

Properties

dim int
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Float32List
Backing storage. Length == dim. Callers should treat this as immutable; use Vector.copy before mutating.
final

Methods

copy() Vector
Deep copy.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited