Class Bank<T, S>

A bank of reactor instances.

Type Parameters

Constructors

  • Construct a new bank of given width on the basis of a given reactor class and a list of arguments.

    Type Parameters

    Parameters

    • container: Reactor
    • width: number

      the width of the bank

    • cls: ReactorClass<T, S>

      the class to construct reactor instances of that will populate the bank

    • Rest...parameters: ParmList<S>

      the arguments to pass into the constructor of the given reactor class

    Returns Bank<T, S>

Properties

initializationMap: Map<Reactor, number> = ...

A mapping from containing reactors to indices corresponding to the member of a contained bank that is currently being initialized (if there is one).

Methods

  • Return all reactor instances in this bank.

    Returns T[]

    all reactor instances in this bank

  • Return the reactor instance that corresponds to the given index.

    Parameters

    • index: number

      index of the reactor instance inside this bank

    Returns T

    the reactor instances that corresponds to the given index

  • Return a list of ports selected across all bank members by the given lambda.

    Type Parameters

    Parameters

    • selector: ((reactor: T) => P)

      lambda function that takes a reactor of type T and return a port of type P

        • (reactor): P
        • Parameters

          • reactor: T

          Returns P

    Returns P[]

    a list of ports selected across all bank members by the given lambda

  • Returns string