Represents a vector whose components are all the same.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class ConstantVector _
	Inherits Vector
C#
public sealed class ConstantVector : Vector
C++
public ref class ConstantVector sealed : public Vector

Methods

IconTypeDescription
AbsoluteMax()
Returns the value of the component in this Vector that has the largest absolute value.
AbsoluteMaxIndex()
Returns the index of the component in this Vector that has the largest absolute value.
AbsoluteMin()
Returns the value of the component in this Vector that has the smallest absolute value.
AbsoluteMinIndex()
Returns the index of the component in this Vector that has the smallest absolute value.
Add(Vector)
Adds another vector to this vector.
Add(Double, Vector)
Adds a scaled vector to this vector.
Add(Matrix, Vector)
Adds the product of a Matrix and a Vector to this Vector.
Add(Double, Matrix, Vector)
Adds the scaled product of a Matrix and a Vector to this Vector.
Apply(RealFunction)
Applies a function to the elements of a Vector.
Clone(CloningMethod)
Makes a copy of this Vector using the specified method.
CloneData()
Gives this instance its own copy of its elements.
ComponentwiseDivide(Vector)
Divides the components of this instance by the corresponding components of another vector.
ComponentwiseMultiply(Vector)
Multiplies the components of this instance by the corresponding components of another vector.
CopyTo(Vector, Int32)
Copies the components of this Vector to another vector starting at the specified position.
CopyTo(Vector)
Copies the components of this Vector to another vector.
CopyTo(Double[]())
Copies the components of this Vector to another vector.
DotProduct(Vector)
Returns the dot product of this vector with another vector.
Equals(Object)
Determines whether the specified Object is equal to the current Vector.
Finalize()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
GetComponents()
Gets the components of the Vector.
GetEnumerator()
Returns a VectorEnumerator for this Vector.
GetHashCode()
Returns the hash code for this instance.
GetObjectData(SerializationInfo, StreamingContext)
Populates a SerializationInfo with the data needed to serialize the target object.
GetSubvector(Range)
Returns a vector whose components are a subset of the components of this instance
GetSubvector(Int32, Int32)
Returns a vector whose components are a subset of the components of this instance
GetSubvector(Int32, Int32, Int32)
Returns a vector whose components are a subset of the components of this instance
GetSubvector(Int32, Int32, Int32, Intent)
Returns a vector whose components are a subset of the components of this instance
GetSum()
Gets the sum of the components of the vector.
GetType()
Gets the Type of the current instance.
GetValue(Int32)
Gets the vector component at the specified position.
IsComponentWritable(Int32)
Gets a value indicating whether the value of the component at the specified index can be changed.
Max()
Returns the value of the largest component in this Vector.
MaxIndex()
Returns the index of the largest component in this Vector.
MemberwiseClone()
Creates a shallow copy of the current Object.
Min()
Returns the value of the smallest component in this Vector.
MinIndex()
Returns the index of the smallest component in this Vector.
Multiply(Double)
Multiplies a vector by a given factor.
Multiply(Matrix)
Adds the scaled product of a Matrix and a Vector to this Vector.
Multiply(Matrix, MatrixOperationSide)
Multiplies a Vector by a Matrix.
Norm()
Returns the two-norm of the Vector.
Norm(Int32)
Returns the norm of the specified order of this Vector.
Norm(Double)
Returns the norm of the specified order of this Vector.
Normalize()
Scales the Vector to make its two-norm equal to one.
NormInternal(Int32)
Returns the norm of the specified order of this Vector.
NormInternal(Double)
Returns the norm of the specified order of this Vector.
NormSquared()
Returns the square of the two-norm of this Vector.
OneNorm()
Returns the one-norm of this Vector.
SetToZero()
Sets all the components of the Vector to 0.
SetValue(Double, Int32)
Sets the vector component at the specified position to the specified value.
SetValue(Double)
Sets all the components of the Vector to the specified value.
ShallowCopy()
Makes a shallow copy of this Vector.
Subtract(Vector)
Subtracts another Vector from this Vector.
Subtract(Matrix, Vector)
Subtracts the product of a Matrix and a Vector from this Vector.
SwapElements(Int32, Int32)
Exchanges two elements of the vector.
ToGeneralVector()
Makes a copy of this instance and returns it as a GeneralVector.
ToString()
Returns a String representation of this Vector.
ToString(String)
Converts the numeric value of this Vector instance to its equivalent string representation, using the specified format.
ToString(String, IFormatProvider)
Returns a String representation of this GeneralMatrix.
ToStringInternal(StringBuilder, String, IFormatProvider)
Writes a string representation of this Vector to an instance of StringBuilder using the specified number format.
Zero()
Sets all the components of the Vector to 0.

Constructors

IconTypeDescription
ConstantVectorNew(Int32, Double)
Constructs a new ConstantVector.

Properties

IconTypeDescription
Item(Int32)
Gets or sets a specific component of this vector.
Item(Range)
Gets or sets a range of components of the Vector.
Length
Gets the number of elements in the Vector.

Remarks

The ConstantVector class represents a Vector whose components all have the same, constant value. They are used primarily as views on structured matrices, where the structure of the matrix dictates that certain elements be zero or one.

The components of a ConstantVector cannot be modified. Attempting to do so causes an exception of type ComponentReadOnlyException.

Inheritance Hierarchy

System.Object
  Extreme.Mathematics.LinearAlgebra.Vector
    Extreme.Mathematics.LinearAlgebra.ConstantVector