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
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
SymEngine_jll = "3428059b-622b-5399-b16f-d347a77089a4"

[weakdeps]
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
#SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c"

[extensions]
SymEngineSymbolicUtilsExt = "SymbolicUtils"
#SymEngineSymbolicUtilsExt = "SymbolicUtils"
SymEngineTermInterfaceExt = "TermInterface"

[compat]
Compat = "0.63.0, 1, 2, 3, 4"
RecipesBase = "0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 1.0"
SpecialFunctions = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 1, 2"
SymEngine_jll = "0.9, 0.10, 0.11, 0.12"
SymbolicUtils = "3"
#SymbolicUtils = "3"
TermInterface = "2"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
#SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c"

[targets]
test = ["SymbolicUtils", "TermInterface", "Test"]
test = ["TermInterface", "Test"]
13 changes: 2 additions & 11 deletions docs/src/basicUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,9 @@ a

Other types that may be useful to minimize allocations are `SymEngine.CSetBasic` and `SymEngine.CVecBasic`.

## Use with `SymbolicUtils` and `TermInterface`
## Use with `TermInterface`

There is an extension for `TermInterface` (and `SymbolicUtils`) which should allow the symbolic simplification routines from `SymbolicUtils` to be of use.


```@example symengine
using SymbolicUtils;
@vars x
simplify(sin(x)^2 + cos(x)^2)
```

The `TermInterface` package allows general symbolic expression manipulation. This example shows how some of the functionality of `subs` can be programmed using the package's interface.
There is an extension for `TermInterface`. The `TermInterface` package allows general symbolic expression manipulation. This example shows how some of the functionality of `subs` can be programmed using the package's interface.

```@example symengine
using TermInterface
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ x,y,z = symbols("x y z")
# is/has/free symbol(s)
@vars x y z
@test SymEngine.is_symbol(x)
@test (@allocated SymEngine.is_symbol(x)) == 0
#@test (@allocated SymEngine.is_symbol(x)) == 0
@test !SymEngine.is_symbol(x(2))
@test !SymEngine.is_symbol(x^2)
@test SymEngine.has_symbol(x^2, x)
Expand Down
4 changes: 3 additions & 1 deletion test/test-SymbolicUtils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Test
using SymEngine
import SymbolicUtils: simplify, @rule, @acrule, Chain, Fixpoint

import TermInterface
@testset "TermInterface" begin
Expand All @@ -11,6 +10,8 @@ import TermInterface
@test TermInterface.arguments(sin(x)) == [x]
end

#=
import SymbolicUtils: simplify, @rule, @acrule, Chain, Fixpoint
@testset "SymbolicUtils" begin
# from SymbolicUtils.jl docs
# https://symbolicutils.juliasymbolics.org/rewrite/#rule-based_rewriting
Expand Down Expand Up @@ -60,3 +61,4 @@ end
@test Fixpoint(cas)((cos(x) + sin(x))^2) == 1 + 2cos(x)*sin(x)

end
=#
Loading