3using System.Reflection;
19 private DateTime[] values;
20 private ICollection<IElement> elements;
21 private readonly
int dimension;
31 this.dimension =
Values.Length;
52 if (this.values is
null)
54 DateTime[] v =
new DateTime[this.dimension];
62 while (!(Loop is
null))
64 for (j = Loop.
Start, c = Loop.
Pos; j < c; j++)
67 TP = DateTime.MinValue;
80 TP = DateTime.MinValue;
100 if (this.elements is
null)
105 for (i = 0; i < this.dimension; i++)
111 return this.elements;
123 StringBuilder sb =
null;
125 foreach (DateTime d
in this.
Values)
128 sb =
new StringBuilder(
"[");
140 return sb.ToString();
151 if (this.associatedVectorSpace is
null)
154 return this.associatedVectorSpace;
211 for (i = 0; i < this.dimension; i++)
213 if (
Values[i] != Values2[i])
230 for (i = 0; i < this.dimension; i++)
241 get {
return false; }
278 if (this.zero is
null)
294 if (Index < 0 || Index >= this.dimension)
297 DateTime[] V = this.
Values;
309 if (Index < 0 || Index >= this.dimension)
313 throw new ScriptException(
"Elements in a boolean vector are required to be boolean values.");
316 this.elements =
null;
329 if (DesiredType == typeof(DateTime[]))
334 else if (DesiredType.IsAssignableFrom(typeof(
DateTimeVector).GetTypeInfo()))
Node referencing a chunk in a ChunkedList<T>
ChunkNode< T > Next
Next chunk
int Pos
Index after the last element in chunk.
int Start
Index of first element in chunk.
A chunked list is a linked list of chunks of objects of type T .
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, bool AcceptInformationLoss, 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 Encapsulate(ChunkedList< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
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.