CVector Structure

Represents a dense complex vector of arbitrary size.

Definition

Namespace: Austra.Library
Assembly: Austra.Library (in Austra.Library.dll) Version: 2.5.0+44e7797405725ef3cf24b3ff0eba94ce6c649601
C#
public readonly struct CVector : IFormattable, 
	IEnumerable<Complex>, IEnumerable, IEquatable<CVector>, 
	IEqualityOperators<CVector, CVector, bool>, IAdditionOperators<CVector, CVector, CVector>, 
	IAdditionOperators<CVector, Complex, CVector>, IAdditionOperators<CVector, double, CVector>, 
	ISubtractionOperators<CVector, CVector, CVector>, ISubtractionOperators<CVector, Complex, CVector>, 
	ISubtractionOperators<CVector, double, CVector>, IMultiplyOperators<CVector, CVector, Complex>, 
	IMultiplyOperators<CVector, Complex, CVector>, IMultiplyOperators<CVector, double, CVector>, 
	IUnaryNegationOperators<CVector, CVector>, IPointwiseOperators<CVector>, 
	ISafeIndexed, IVector, IIndexable
Inheritance
Object    ValueType    CVector
Implements
IIndexable, IPointwiseOperatorsCVector, ISafeIndexed, IVector, IEnumerableComplex, IEnumerable, IEquatableCVector, IFormattable, IAdditionOperatorsCVector, CVector, CVector, IAdditionOperatorsCVector, Complex, CVector, IAdditionOperatorsCVector, Double, CVector, IEqualityOperatorsCVector, CVector, Boolean, IMultiplyOperatorsCVector, CVector, Complex, IMultiplyOperatorsCVector, Complex, CVector, IMultiplyOperatorsCVector, Double, CVector, ISubtractionOperatorsCVector, CVector, CVector, ISubtractionOperatorsCVector, Complex, CVector, ISubtractionOperatorsCVector, Double, CVector, IUnaryNegationOperatorsCVector, CVector

Remarks

For the sake of acceleration, the vector's components are stored in two separate arrays. Most operations are non-destructive.

Constructors

CVector(Complex)Creates a complex vector for a complex value.
CVector(Complex)Initializes a complex vector from a complex array.
CVector(Double)Creates a complex vector for a real value.
CVector(DVector)Creates a complex vector from a real vector.
CVector(Int32)Creates a complex vector of a given size.
CVector(Complex, Complex)Creates a complex vector from two complex values.
CVector(Double, Double)Creates a complex vector from two real values.
CVector(Double, Double)Creates a complex vector from separate component arrays.
CVector(DVector, DVector)Creates a complex vector from two real vectors.
CVector(Int32, NormalRandom)Creates a vector filled with a normal distribution generator.
CVector(Int32, FuncInt32, CVector, Complex)Creates a vector using a formula to fill its items.
CVector(Int32, FuncInt32, Complex)Creates a vector using a formula to fill its items.
CVector(Int32, Random)Creates a vector filled with a uniform distribution generator.
CVector(Int32, Random, Double, Double)Creates a vector filled with a uniform distribution generator.

Properties

FirstGets the first complex in the vector.
ImaginaryGets the imaginary part of the complex numbers in this vector.
IsInitializedHas the vector been properly initialized?
ItemIndexGets the component at a given index.
ItemInt32Gets or sets the component at a given index.
ItemRangeExtracts a slice from the vector.
LastGets the last complex in the vector.
LengthGets the dimensions of the vector.
RealGets the real part of the complex numbers in this vector.

Methods

AbsMaxGets maximum absolute magnitude in the vector.
AbsMinGets minimum absolute magnitude in the vector.
AllChecks whether the predicate is satisfied by all items.
AnyChecks whether the predicate is satisfied by at least one item.
CloneCreates an identical vector.
ConjugateCreates a new complex vector with conjugated values.
ContainsChecks if the vector contains the given value.
DeconstructDeconstructs the vector into a tuple of real and imaginary vectors.
DistinctReturns a new vector with the distinct values in the original one.
Equals(CVector)Checks if the provided argument is a vector with the same values.
Equals(Object)Checks if the provided argument is a complex vector with the same values.
(Overrides ValueTypeEquals(Object))
FftComputes the real discrete Fourier transform.
FilterCreates a new vector by filtering items with the given predicate.
FilterMapCreates a new vector by filtering and mapping at the same time.
Find(Complex)Returns all indexes containing ocurrences of a value.
Find(FuncComplex, Boolean)Returns all indexes satisfying a condition.
GetEnumeratorRetrieves an enumerator to iterate over components.
GetHashCodeReturns the hashcode for this complex vector.
(Overrides ValueTypeGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IndexOf(Complex)Returns the zero-based index of the first occurrence of a value.
IndexOf(Complex, Int32)Returns the zero-based index of the next occurrence of a value.
InplaceAddInplace addition of two vectors.
InplaceNegateInplace negation of the vector.
InplaceSubInplace substraction of two vectors.
Magnitudes Gets a vector containing the magnitudes of the complex numbers in this vector.
Map Creates a new vector by transforming each item with the given function.
MapReal Creates a real vector by transforming each item with the given function.
MeanComputes the mean of the vector's items.
MultiplyAddOptimized vector multiplication and addition.
MultiplySubtractOptimized vector scaling and subtraction.
NormGets the Euclidean norm of this vector.
Phases Gets a vector containing the phases of the complex numbers in this vector.
PlotCreates a plot for this vector.
PointwiseDividePointwise division.
PointwiseMultiplyPointwise multiplication.
ProductCalculates the product of the vector's items.
ReduceCreates an aggregate value by applying the reducer to each item.
ReverseCreates a reversed copy of the vector.
SafeThis Safe access to the vector's components. If the index is out of range, a zero is returned.
SquaredGets the squared norm of this vector.
SubtractMultiplyOptimized subtraction of scaled vector.
SumCalculates the sum of the vector's items.
ToStringGets a textual representation of this vector.
(Overrides ValueTypeToString)
ToString(String, IFormatProvider)Gets a textual representation of this vector.
ZipCombines the common prefix of two vectors.

Operators

Addition(Complex, CVector)Adds a complex scalar to a complex vector.
Addition(CVector, CVector)Adds two complex vectors.
Addition(CVector, Double)Adds a double scalar to a complex vector.
Addition(CVector, Complex)Adds a complex scalar to a complex vector.
Addition(Double, CVector)Adds a double scalar to a complex vector.
Division(CVector, Double)Divides a complex vector by a scalar.
Division(CVector, Complex)Divides a complex vector by a complex value.
Equality(CVector, CVector)Compares two complex vectors for equality.
(CVector to Complex)Explicit conversion from vector to array.
Inequality(CVector, CVector)Compares two complex vectors for inequality.
Multiply(Complex, CVector)Multiplies a complex scalar value by a vector.
Multiply(CVector, CVector)Dot product of two vectors.
Multiply(CVector, Double)Multiplies a vector by a scalar value.
Multiply(CVector, Complex)Multiplies a vector by a scalar value.
Multiply(Double, CVector)Multiplies a real scalar value by a vector.
Subtraction(Complex, CVector)Subtracts a vector from a scalar.
Subtraction(CVector, CVector)Subtracts two complex vectors.
Subtraction(CVector, Double)Subtracts a scalar from a complex vector.
Subtraction(CVector, Complex)Subtracts a scalar from a complex vector.
Subtraction(Double, CVector)Subtracts a vector from a scalar.
UnaryNegation(CVector)Negates a complex vector.

See Also