#include "iscope.h"
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>
#include "tdefs.h"
#include <iostream>
#include "array.h"
Functions | |
void | iscopeStep (Net *net, array< int8 > *scope, array< int8 > *depl, array< int8 > *seed, array< int8 > *block) |
calculate one interation | |
array< state * > * | iscope (Net *net, int max, array< int8 > *seed, array< int8 > *block) |
calculate the scope | |
void | iscopeRun (Net *net, int min, int max, array< state * > *scopes, array< int8 > *seed, array< int8 > *block) |
continue calculating the scope |
calculate the scope
net | the network object | |
max | maximum number of iterations | |
seed | compounds always present | |
block | compounds always blocked (depleted) |
calculates the scope in the given network. seed, block are of type array<int8> containing a value !=0 at each index whose compound is in the set and 0 otherwise. returns an array of type array<state*>* with the state of the network for each time step. the state contains to arrays, state->scope (compounds present or not) state->depl (compound blocked or not). The calculation stops if either a static or cyclic solution is detected.
void iscopeRun | ( | Net * | net, | |
int | min, | |||
int | max, | |||
array< state * > * | scopes, | |||
array< int8 > * | seed, | |||
array< int8 > * | block | |||
) |
continue calculating the scope
net | the network object | |
min | minimum number of iterations | |
max | maximum number of iterations | |
seed | compounds always present | |
block | compounds always blocked (depleted) |
calculates the scope in the given network, continuing a previous calculation. May be used to change conditions at a certain time point. scopes is the array of scopes calculated before (may be an empty array). seed, block are of type array<int8> containing a value !=0 at each index whose compound is in the set and 0 otherwise. min forces min steps even if static or cyclic solution is encountered earlier. set min=n and max=n to calculate exactly n steps.
void iscopeStep | ( | Net * | net, | |
array< int8 > * | scope, | |||
array< int8 > * | depl, | |||
array< int8 > * | seed, | |||
array< int8 > * | block | |||
) |
calculate one interation
net | the network object | |
scope | the currently present compound | |
depl | the currently depleted compound | |
seed | compounds always present | |
block | compounds always blocked (depleted) |
calculates one interation in the scope algorithm using the given network. scope, depl, seed, block are of type array<int8> containing a value !=0 at each index whose compound is in the set and 0 otherwise.