API Docs for: 1.0

Class Ord

Class defined in: src/js/Ord.js:19

Construtor to build an ordinal number as an object containing a list of OrdSummand objects. Note that such an object must be normalized (the exponents of the summands are decreasing with increasing index).

Ord( ordSummand )
src/js/Ord.js:19
Parameters:
  • ordSummand <OrdSummand / number>

    The first summand of the ordinal number. If ordSummand is an instance of OrdSummand, it is directly put in its place. Otherwise it has to be a natural number, then a new instance of OrdSummand is created which represents this natural number, and which is finally appended to the new Ord object.

addSummand( summand )
src/js/Ord.js:162

Append a summand to the end of the list. Note that you have to be sure not to violate the normalized form of the Ordinal!

Parameters:
cleanUp( )
src/js/Ord.js:183

Checks for Summands with factor 0 and removes them. Also replaces natural exponents of type Ord with its

number
representations to simplify further calculations and the output representation.

Boolean equalsNull( )
src/js/Ord.js:81

Checks if this Ordinal number would be equal to the natural number "0". Presumes that this Ordinal is normalized.


Returns: <Boolean> True, if this == 0.
Boolean equalsOmega( )
src/js/Ord.js:127

Checks if this Ordinal number is equal to the ordinal number "omega". Presumes that this Ordinal is normalized.


Returns: <Boolean> True, if this == omega
Boolean equalsOne( )
src/js/Ord.js:102

Checks if this Ordinal number is equal to the natural number "1". Presumes that this Ordinal is normalized.


Returns: <Boolean> True, if this == 1
Number getNumOfSumds( )
src/js/Ord.js:173

Get the number of summands stored in this ordinal.


Returns: <Number> The number of summands building this ordinal
OrdSummand getSummand( i )
src/js/Ord.js:147

Returns the summand with the given Index.

Parameters:
  • i <Number>

    The index of the summand. The first summand has the index 0.


Returns: <OrdSummand> The Summand at position i
Boolean isNatural( )
src/js/Ord.js:51

Checks if this Ordinal Number is a natural integer. Presumes that this ordinal is normalized!


Returns: <Boolean> True if this is a natural integer
Boolean isUndefined( )
src/js/Ord.js:71

Checks if this Ordinal is undefined, i.e. it contains no summand.


Returns: <Boolean> True if this Ordinal has no summands
serialize( arr, htmlStyle. )
src/js/Ord.js:214

Converts this ordinal number into a flat array which can easily be converted to a string.

Parameters:
  • arr <Array>

    Reference to an array which will be extended with the data of this ordinal.

  • htmlStyle. <Boolean>

    If true, the serialization generates a html representation.

String toString( htmlStyle )
src/js/Ord.js:235

Returns a string representation of the Ord object.

Parameters:
  • htmlStyle <Boolean>

    Optional. If true, a HTML-Format is generated, especially omega is espressed as 'ω' instead of 'w'.


Returns: <String> The string representation of this object.
sumds <OrdSummand[]>
src/js/Ord.js:34

List of Summands of this Ordinal.