ConstantNode
public class ConstantNode : NSObject, Node
This is a Node object that represents a number as a BigDouble
-
The depth of the deepest children of the
Nodein aTreeDeclaration
Swift
public var maxDepth: Int? -
The depth of the
Nodein aTreeDeclaration
Swift
public var depth: Int? -
Gives String representation of the node
Declaration
Swift
public func toString() -> String -
Gives Tex (String) representation of the node
Declaration
Swift
public func toTex() -> String -
Undocumented
Declaration
Swift
override public var description: String { get } -
Undocumented
Declaration
Swift
public static var any: ConstantNode { get } -
Content of the node
String representation of the number. This is the principal conten of the node, but for even better precision, computation rely on
numberDeclaration
Swift
public var content: String -
Type of the node
Declaration
Swift
public var type: String -
Children of the node
Declaration
Swift
public var children: [Node] -
Number represented by the node.
Optional because it may fail
Declaration
Swift
public var number: BigDouble? -
Create a ConstantNode
Declaration
Swift
public init(_ bn: BigNumber)Parameters
bnBigNumber/BigDouble
-
Create a ConstantNode
Declaration
Swift
public convenience init(_ bi: BigInt)Parameters
biAny BigInt
-
Create a ConstantNode
Declaration
Swift
public init(_ str: String)Parameters
strString
-
Create a ConstantNode
Declaration
Swift
public init(_ int: Int)Parameters
intInteger
-
Create a ConstantNode
Declaration
Swift
public init(_ float: Float)Parameters
floatFloating point number
-
Create a ConstantNode
Declaration
Swift
public init(_ double: Double)Parameters
doubleFloating point number
-
Compiles ConstantNode to simpler node (useless here, but required by protocol)
Declaration
Swift
public func compile() -> Node -
Converts ConstantNode to BigNumber
Declaration
View on GitHub
ConstantNode Class Reference