Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NonlinearNormalForm"
uuid = "05e19671-dec8-4f15-984f-54eaa6ca64be"
authors = ["Matt Signorelli"]
version = "0.5.2"
version = "0.5.3"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand All @@ -28,7 +28,7 @@ Reexport = "1"
ReferenceFrameRotations = "3"
SkewLinearAlgebra = "1"
StaticArrays = "1"
TPSAInterface = "0.3.0"
TPSAInterface = "0.3.1"
julia = "1.9"

[extras]
Expand Down
6 changes: 4 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end

factor_in(t, var::Int, n::Int=1) = (out = zero(t); factor_in!(out, t, var, n))

function factor_in!(out, t, var::Int, n::Int=1)
function factor_in!(out, t, var::Int, n::Int=1, )
TI.is_tps_type(typeof(t)) isa TI.IsTPSType || error("Function only accepts TPS types")
TI.is_tps_type(typeof(out)) isa TI.IsTPSType || error("Function only accepts TPS types")
nn = ndiffs(t)
Expand All @@ -65,7 +65,9 @@ function factor_in!(out, t, var::Int, n::Int=1)
idx = TI.cycle!(t, 0, mono=tmpmono, val=v)
while idx > 0
tmpmono[var] += n
TI.setm!(out, v[], tmpmono)
if TI.isvalidm(out, tmpmono)
TI.setm!(out, v[], tmpmono)
end
idx = TI.cycle!(t, idx, mono=tmpmono, val=v)
end
return out
Expand Down
Loading