2using System.Collections.Generic;
3using System.Reflection;
18 private DateTime[] values;
19 private ICollection<IElement> elements;
20 private readonly
int dimension;
30 this.dimension =
Values.Length;
51 if (this.values is
null)
53 DateTime[] v =
new DateTime[this.dimension];
59 TP = DateTime.MinValue;
78 if (this.elements is
null)
83 for (i = 0; i < this.dimension; i++)
101 StringBuilder sb =
null;
103 foreach (DateTime d
in this.
Values)
106 sb =
new StringBuilder(
"[");
118 return sb.ToString();
129 if (this.associatedVectorSpace is
null)
132 return this.associatedVectorSpace;
189 for (i = 0; i < this.dimension; i++)
191 if (
Values[i] != Values2[i])
208 for (i = 0; i < this.dimension; i++)
219 get {
return false; }
245 if (this.zero is
null)
261 if (Index < 0 || Index >= this.dimension)
264 DateTime[] V = this.
Values;
276 if (Index < 0 || Index >= this.dimension)
280 throw new ScriptException(
"Elements in a boolean vector are required to be boolean values.");
283 this.elements =
null;
296 if (DesiredType == typeof(DateTime[]))
301 else if (DesiredType.GetTypeInfo().IsAssignableFrom(typeof(
DateTimeVector).GetTypeInfo()))
Base class for all types of elements.
abstract object AssociatedObjectValue
Associated object value.
Base class for all types of vector space elements (vectors).
Base class for script exceptions.
Class managing a script expression.
static bool TryConvert(object Value, Type DesiredType, out object Result)
Tries to convert an object Value to an object of type DesiredType .
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
Base class for all nodes in a parsed script tree.
override ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
override int GetHashCode()
Calculates a hash code of the element.
override IVectorSpaceElement MultiplyScalar(IFieldElement Scalar)
Tries to multiply a scalar to the current element.
override bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
override IAbelianGroupElement Add(IAbelianGroupElement Element)
Tries to add an element to the current element.
override IGroupElement Negate()
Negates the element.
DateTimeVector(ICollection< IElement > Elements)
DateTime-valued vector.
DateTime[] Values
Vector element values.
override bool IsScalar
If the element represents a scalar value.
override IAbelianGroupElement Zero
Returns the zero element of the group.
override bool Equals(object obj)
Compares the element to another.
override IVectorSpace AssociatedVectorSpace
Associated Right-VectorSpace.
override IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
override void SetElement(int Index, IElement Value)
Sets an element in the vector.
override int Dimension
Dimension of vector.
override object AssociatedObjectValue
Associated object value.
override string ToString()
override IElement GetElement(int Index)
Gets an element of the vector.
ICollection< IElement > Elements
Vector elements.
DateTimeVector(params DateTime[] Values)
DateTime-valued vector.
Pseudo-vector space of DateTime-valued vectors.
static IElement Encapsulate(Array Elements, bool CanEncapsulateAsMatrix, ScriptNode Node)
Encapsulates the elements of a vector.
Basic interface for all types of abelian group elements.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for all types of field elements.
Basic interface for all types of group elements.
Basic interface for all types of module elements.
Basic interface for all types of modules.