Changeset 20679 in project


Ignore:
Timestamp:
10/07/10 06:24:23 (8 years ago)
Author:
iraikov
Message:

9ML: added interval and graph modules

Location:
release/4/9ML-toolkit/trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • release/4/9ML-toolkit/trunk/9ML-toolkit.meta

    r20126 r20679  
    77 ; List here all the files that should be bundled as part of your egg. 
    88
    9  (files "NineMLcore.scm" "NineMLsignal.scm" "NineMLdiagram.scm"
     9 (files "NineMLcore.scm" "NineMLsignal.scm" "NineMLinterval.scm" "NineMLdiagram.scm"
    1010        "report.scm"
    1111        "SXML.scm" "SXML-to-XML.scm"
  • release/4/9ML-toolkit/trunk/9ML-toolkit.setup

    r20126 r20679  
    55
    66(make (
    7        ("9ML-report" ("NineMLcore.scm" "NineMLsignal.scm" "NineMLdiagram.scm" "report.scm" )
     7       ("9ML-report"
     8        ("NineMLcore.scm" "NineMLsignal.scm" "NineMLdiagram.scm" "NineMLinterval.scm" "NineMLgraph.scm" "report.scm" )
    89        (compile -O -d2 -S report.scm -o 9ML-report ))
    910
  • release/4/9ML-toolkit/trunk/NineMLdiagram.scm

    r20126 r20679  
    1111  (define-values (type-variables reset-type-variables
    1212                                 find-type-variable
    13                                  begin-def end-def generalize
     13                                 begin-def end-def newvar generalize
    1414                                 make-deftype make-valtype make-kind
    1515                                 binop ternop path-star path-arrow
  • release/4/9ML-toolkit/trunk/NineMLsignal.scm

    r20126 r20679  
    1212  (define-values (type-variables reset-type-variables
    1313                                 find-type-variable
    14                                  begin-def end-def generalize
     14                                 begin-def end-def newvar generalize
    1515                                 make-deftype make-valtype make-kind
    1616                                 binop ternop path-star path-arrow
  • release/4/9ML-toolkit/trunk/examples/LeakyIAF.9ML

    r20126 r20679  
    11
    22
    3 module S = Signal  ;;
    4 module D = Diagram ;;
     3component S = Signal  ;;
     4component D = Diagram ;;
     5component G = Graph ;;
    56
    67component LeakyIAF =
     
    2223   val trefractory    = S.signal `trefractory
    2324   val refractory_end = S.signal `refractory_end
    24 
    25    val  subthreshold_rhs = (S.div (S.add (S.mul (S.neg gL) (S.sub V vL)) Isyn) C)
    26    val  subthreshold_eq  = D.ODE `V `t subthreshold_rhs
    2725 
    2826 end
     
    5250               in
    5351                 LeakyIAF
     52
     53
     54(* a graph to represent the excitatory population *)
     55
     56val N_exc = 0d100
     57val I_exc = Interval.closed_interval 0d1 N_exc
     58val excitatory_population = G.set_node_interval_property (G.make_nodes (N_exc))
     59                              I_exc `synapticPrototype make_diagram
     60
     61(* a graph to represent the inhibitory population *)
     62
     63val N_inh = 0d100
     64val I_inh = Interval.closed_interval 0d1 N_inh
     65val inhibitory_population = G.set_node_interval_property (G.make_nodes (N_inh))
     66                              I_inh `synapticPrototype make_diagram
     67
     68(* disjoint union of the two populations *)
     69val populations = G.disjoint_union excitatory_population inhibitory_population
     70
     71(* random graph G(N,P) *)
     72val P = 0.02
     73val connections = G.gnp_graph (N_exc + N_inh) P
     74
     75(* graph union: node attributes take precedence from left to right *)
     76val populations_and_connections = G.union populations connections
     77
     78(* final network *)
     79val I_network = Interval.closed_interval 0d1 (N_exc + N_inh)
     80val network = G.set_edge_interval_property populations_and_connections
     81                   I_network I_network `synapticPrototype make_diagram
     82
    5483end
     84
  • release/4/9ML-toolkit/trunk/report.scm

    r20330 r20679  
    3939(include "NineMLsignal.scm")
    4040(include "NineMLdiagram.scm")
     41(include "NineMLinterval.scm")
     42(include "NineMLgraph.scm")
    4143
    4244(define init-scope      (make-parameter st-empty))
     
    730732
    731733  (let ((find-module (lambda (x) (env-find-module x (init-type-env)))))
    732     (Signal:module-initialize "Signal" enter-module find-module init-eval-env)
    733     (Diagram:module-initialize "Diagram" enter-module find-module init-eval-env)
     734    (Signal:module-initialize   "Signal" enter-module find-module init-eval-env)
     735    (Diagram:module-initialize  "Diagram" enter-module find-module init-eval-env)
     736    (Interval:module-initialize "Interval" enter-module find-module init-eval-env)
     737    (Graph:module-initialize    "Graph" enter-module find-module init-eval-env)
    734738    )
    735739
Note: See TracChangeset for help on using the changeset viewer.