Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
e4eca250
Commit
e4eca250
authored
Jul 27, 2021
by
Miroslav Kratochvil
🚴
Browse files
support for logical operators
Closes #133
parent
c97c1fb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/math.jl
View file @
e4eca250
...
...
@@ -71,6 +71,8 @@ function parse_math(ast::VPtr)::Math
relational_oper
(
Int
(
ccall
(
sbml
(
:
ASTNode_getType
),
Cint
,
(
VPtr
,),
ast
))),
parse_math_children
(
ast
),
)
elseif
ast_is
(
ast
,
:
ASTNode_isLogical
)
return
MathApply
(
get_string
(
ast
,
:
ASTNode_getName
),
parse_math_children
(
ast
))
elseif
ast_is
(
ast
,
:
ASTNode_isLambda
)
children
=
parse_math_children
(
ast
)
if
!
isempty
(
children
)
...
...
src/symbolics.jl
View file @
e4eca250
...
...
@@ -16,6 +16,7 @@ const default_symbolics_mapping = Dict{String,Any}(
"-"
=>
:-
,
"/"
=>
:/
,
"abs"
=>
:
abs
,
"and"
=>
:&
,
"arccos"
=>
:
acos
,
"arccosh"
=>
:
acosh
,
"arccot"
=>
:
acot
,
...
...
@@ -46,6 +47,8 @@ const default_symbolics_mapping = Dict{String,Any}(
"log"
=>
:
sbmlLog
,
"lt"
=>
:<
,
"neq"
=>
:
(
sbmlNeq
),
"not"
=>
:
not
,
"or"
=>
:|
,
"piecewise"
=>
:
(
sbmlPiecewise
),
"power"
=>
:^
,
"root"
=>
:
sbmlRoot
,
...
...
@@ -55,6 +58,7 @@ const default_symbolics_mapping = Dict{String,Any}(
"sin"
=>
:
sin
,
"tanh"
=>
:
tanh
,
"tan"
=>
:
tan
,
"xor"
=>
:
xor
,
)
function
sbmlPiecewise
(
args
...
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment