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
4ef5b4b3
Unverified
Commit
4ef5b4b3
authored
Jul 27, 2021
by
Miroslav Kratochvil
🚴
Committed by
GitHub
Jul 27, 2021
Browse files
Merge pull request #135 from LCSB-BioCore/mk-logical-math
support for logical operators
parents
c97c1fb7
e4eca250
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/math.jl
View file @
4ef5b4b3
...
...
@@ -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 @
4ef5b4b3
...
...
@@ -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
...
)
...
...
cylon-x
🤖
@cylon-x
mentioned in commit
f012baf8
·
Jul 27, 2021
mentioned in commit
f012baf8
mentioned in commit f012baf88b4cbb24e39f35bc291a0bd539249fc8
Toggle commit list
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