PrototypeVector<T>

Models & Types · AiDotNet.Prototypes

Prototype vector class that delegates operations to the execution engine. Used to validate the Execution Engine pattern before production integration.

How It Works

This is a PROTOTYPE for Phase A validation. The production version will integrate directly with the existing Vector class.

PrototypeVector demonstrates:

  • Engine delegation pattern
  • Vectorized operations (no element-wise for-loops)
  • Transparent GPU acceleration
  • Zero constraint cascade

Constructors

Constructor Summary
PrototypeVector(T[] data) Initializes a new instance of the PrototypeVector class from an array.
PrototypeVector(Vector<T> data) Initializes a new instance of the PrototypeVector class from an array.
PrototypeVector(int length) Initializes a new instance of the PrototypeVector class from an array.

Properties

Property Summary
T Item { get; set; }
int Length { get; } Gets the length of the vector.

Methods

Method Summary
PrototypeVector<T> Add(PrototypeVector<T> other) Adds two vectors element-wise using the current execution engine.
PrototypeVector<T> Divide(PrototypeVector<T> other) Divides the vector by a scalar.
PrototypeVector<T> Divide(T scalar) Divides the vector by a scalar.
PrototypeVector<T> FromArray(T[] data) Creates a vector from an array.
PrototypeVector<T> Multiply(PrototypeVector<T> other) Multiplies the vector by a scalar.
PrototypeVector<T> Multiply(T scalar) Multiplies the vector by a scalar.
PrototypeVector<T> Ones(int length) Creates a vector filled with ones.
PrototypeVector<T> Power(T exponent) Raises each element to the specified power.
PrototypeVector<T> Sqrt() Computes the square root of each element.
PrototypeVector<T> Subtract(PrototypeVector<T> other) Subtracts another vector from this vector element-wise.
PrototypeVector<T> Zeros(int length) Creates a vector filled with zeros.
T[] ToArray() Converts to array.
Vector<T> ToVector() Gets the underlying Vector data.
string ToString() Returns a string representation of the vector.