Skip to content

Commit 692987f

Browse files
committed
Update docs for Node constructor
1 parent 9a42fae commit 692987f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/src/types.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Node{T}
3535
There are a variety of constructors for `Node` objects, including:
3636

3737
```@docs
38-
Node(; val=nothing, feature::Integer=nothing)
3938
Node(::Type{T}; val=nothing, feature::Integer=nothing) where {T}
4039
Node(op::Int, l::Node)
4140
Node(op::Int, l::Node, r::Node)

src/Equation.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,16 @@ function Base.convert(
9898
end
9999

100100
"""
101-
Node(; val::Real=nothing, feature::Integer=nothing)
101+
Node([::Type{T}]; val=nothing, feature::Int=nothing) where {T}
102102
103103
Create a leaf node: either a constant, or a variable.
104104
105105
# Arguments:
106106
107-
- `val::Real`, if you are specifying a constant, pass
107+
- `::Type{T}`, optionally specify the type of the
108+
node, if not already given by the type of
109+
`val`.
110+
- `val`, if you are specifying a constant, pass
108111
the value of the constant here.
109112
- `feature::Integer`, if you are specifying a variable,
110113
pass the index of the variable here.

0 commit comments

Comments
 (0)