From d2e4ab854c72ace64e84a81992d1682d7968288b Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 26 Mar 2023 23:29:51 +0200 Subject: [PATCH] Start tbn.scrbl. --- scribblings/dds.scrbl | 1 + scribblings/functions.scrbl | 2 +- scribblings/tbn.scrbl | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 scribblings/tbn.scrbl diff --git a/scribblings/dds.scrbl b/scribblings/dds.scrbl index 2b8522b..a8c24af 100644 --- a/scribblings/dds.scrbl +++ b/scribblings/dds.scrbl @@ -28,4 +28,5 @@ dds currently includes the following modules: @include-section["functions.scrbl"] @include-section["dynamics.scrbl"] @include-section["networks.scrbl"] +@include-section["tbn.scrbl"] @include-section["rs.scrbl"] diff --git a/scribblings/functions.scrbl b/scribblings/functions.scrbl index 1ff47d1..1d16003 100644 --- a/scribblings/functions.scrbl +++ b/scribblings/functions.scrbl @@ -461,7 +461,7 @@ a list of arguments. (random-bool-f/list '(#t #f)) ]} -@section{Threshold Boolean functions} +@section[#:tag "tbf"]{Threshold Boolean functions} @defstruct*[tbf ([weights (Vectorof Real)] [threshold Real])]{ diff --git a/scribblings/tbn.scrbl b/scribblings/tbn.scrbl new file mode 100644 index 0000000..a714595 --- /dev/null +++ b/scribblings/tbn.scrbl @@ -0,0 +1,32 @@ +#lang scribble/manual +@(require scribble/example racket/sandbox + (for-label typed/racket/base + "../networks.rkt" + "../utils.rkt" + "../functions.rkt" + "../dynamics.rkt")) + +@(define tbn-evaluator + (parameterize ([sandbox-output 'string] + [sandbox-error-output 'string] + [sandbox-memory-limit 50]) + (make-evaluator 'typed/racket #:requires '("tbn.rkt")))) + +@(define-syntax-rule (ex . args) + (examples #:eval tbn-evaluator . args)) + +@(define-syntax-rule (deftypeform . args) + (defform #:kind "type" . args)) + +@(define-syntax-rule (deftype . args) + (defidform #:kind "type" . args)) + +@title[#:tag "tbn"]{dds/tbn: Threshold and Sign Boolean Networks (TBN and SBN)} + +@defmodule[dds/tbn] + +This module defines threshold Boolean networks (TBN), as well as sign +Boolean networks (SBN). The update functions in such networks are +respectively @seclink["tbf" #:doc '(lib +"dds/scribblings/dds.scrbl")]{threshold Boolean functions} and sign +Boolean functions.