Add reaction and Reaction.
This commit is contained in:
parent
3821a11d38
commit
6cf1505a61
2 changed files with 22 additions and 1 deletions
8
rs.rkt
8
rs.rkt
|
@ -4,12 +4,18 @@
|
||||||
(require typed/graph "utils.rkt" "dynamics.rkt")
|
(require typed/graph "utils.rkt" "dynamics.rkt")
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
Species)
|
Species (struct-out reaction) Reaction)
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
(require typed/rackunit))
|
(require typed/rackunit))
|
||||||
|
|
||||||
(define-type Species Symbol)
|
(define-type Species Symbol)
|
||||||
|
|
||||||
|
(struct reaction ([reactants : (Setof Species)]
|
||||||
|
[inhibitors : (Setof Species)]
|
||||||
|
[products : (Setof Species)])
|
||||||
|
#:transparent
|
||||||
|
#:type-name Reaction)
|
||||||
)
|
)
|
||||||
|
|
||||||
(require graph "utils.rkt" "generic.rkt")
|
(require graph "utils.rkt" "generic.rkt")
|
||||||
|
|
|
@ -32,6 +32,21 @@ A synonym of @racket[Symbol].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@defstruct*[reaction ([reactants (Setof Species)]
|
||||||
|
[inhibitors (Setof Species)]
|
||||||
|
[products (Setof Species)])]{
|
||||||
|
|
||||||
|
A reaction is a triple of sets, giving the reactants, the inhibitors,
|
||||||
|
and the products, respectively.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@deftype[Reaction]{
|
||||||
|
|
||||||
|
The type of the instances of @racket[reaction].
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@section{Org-mode interaction}
|
@section{Org-mode interaction}
|
||||||
|
|
||||||
This section contains some useful primitives for
|
This section contains some useful primitives for
|
||||||
|
|
Loading…
Reference in a new issue