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:-
summand<OrdSummand>The summand to append.
cleanUp( )
src/js/Ord.js:183
Checks for Summands with factor 0 and removes them. Also replaces natural exponents of type Ord with its
numberrepresentations to simplify further calculations and the output representation.
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.
equalsOmega( )
src/js/Ord.js:127
Checks if this Ordinal number is equal to the ordinal number "omega". Presumes that this Ordinal is normalized.
equalsOne( )
src/js/Ord.js:102
Checks if this Ordinal number is equal to the natural number "1". Presumes that this Ordinal is normalized.
getNumOfSumds( )
src/js/Ord.js:173
Get the number of summands stored in this ordinal.
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.
isNatural( )
src/js/Ord.js:51
Checks if this Ordinal Number is a natural integer. Presumes that this ordinal is normalized!
isUndefined( )
src/js/Ord.js:71
Checks if this Ordinal is undefined, i.e. it contains no summand.
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: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'.
Transfinite Ordinal Calculator: Ord