30 |
import java.util.*; |
import java.util.*; |
31 |
|
|
32 |
/** This node function is multiplexer for two nodefunctions. |
/** This node function is multiplexer for two nodefunctions. |
|
* All nodefunctions are cached. |
|
33 |
* Multiplexer definitely is *not* pure node function but |
* Multiplexer definitely is *not* pure node function but |
34 |
* it's good in i.e. focusing nodes. |
* it's good in i.e. focusing nodes. |
35 |
* Multiplexing is done if set of nodes contains the function node. |
* Multiplexing is done if set of nodes contains the function node. |
44 |
* @param unknownNodes Pure node function for nodes which are not in set of known nodes. |
* @param unknownNodes Pure node function for nodes which are not in set of known nodes. |
45 |
* @param knownNodes Pure node function for nodes which are in set of known nodes. |
* @param knownNodes Pure node function for nodes which are in set of known nodes. |
46 |
* @see setMultiplexerNodes |
* @see setMultiplexerNodes |
|
* @param n size of cache used for nodefunction caching. |
|
47 |
*/ |
*/ |
48 |
public MultiplexerNodeFunction(PureNodeFunction unknownNodes, |
public MultiplexerNodeFunction(PureNodeFunction unknownNodes, |
49 |
PureNodeFunction knownNodes, |
PureNodeFunction knownNodes) { |
50 |
ConstGraph graph, int n) { |
this.unknown = unknownNodes; |
51 |
unknown = new CachedPureNodeFunction(n, graph, unknownNodes); |
this.known = knownNodes; |
|
known = new CachedPureNodeFunction(n, graph, knownNodes); |
|
52 |
} |
} |
53 |
|
|
54 |
public void setMultiplexerNodes(Set nodes) { |
public void setMultiplexerNodes(Set nodes) { |