Vector Class

Vector
public class Vector
This language is not supported or no code example is available.
public ref class Vector 
This language is not supported or no code example is available.
public class Vector
This language is not supported or no code example is available.
Name Description
Public constructor Vector() Vector default constructor
Public constructor Vector(int) Vector normal constructor
Top
Name Description
Public property Elements Array of vector elements
Public property Item(int) Access vector element
Public property NRows Number of rows in this vector (vector dimension)
Top
Methods
 
Name Description
Public method Abs() Take an absolute value of a vector, i.e. apply Abs() to each element and return resulting vector
Public method Static AreCompatible(Vector, Vector) Check if two vectors can be compared, i.e. have the same dimensions
Public method ElementDiv(Vector, Vector) Divide target by the source, element-by-element.
Public method ElementMult(Vector, Vector) Multiply target by the source, element-by-element and return resulting vector
Public method Equals(object)
Public method GetHashCode()
Public method IsValid() Check if this vector is initialized
Public method Norm1() Compute the 1-norm of the vector SUM{ |v[i]| }.
Public method Norm2Sqr() Compute the square of the 2-norm SUM{ v[i]^2 }.
Public method NormInf() Compute the infinity-norm of the vector MAX{ |v[i]| }.
Public method Print()
Public method Print(string)
Public method ResizeTo(int) Resize the vector for a specified number of elements, trying to keep intact as many elements of the old vector as possible. If the vector is expanded, the new elements will be zeroes.
Public method Sqr() Square each element of the vector and return resulting vector
Public method Sqrt() Take square root of all elements and return resulting vector
Public method ToString()
Public method Zero() Fill this vector with zeroes
Top
Name Description
Operator Static Addition Add the source vector to the target vector and return resulting vector
Operator Static Addition Add val to every element of the vector and return resulting vector
Operator Static Multiply Multiply every element of the vector with val and return resulting vector
Operator Static Multiply Compute the scalar product of two vectors
Operator Static Subtraction Subtract the source vector from the target vector and return resulting vector
Operator Static Subtraction Subtract val from every element of the vector and return resulting vector
Top

In this article

Definition