Package com.bayesserver.inference
Class DefaultQueryFunctionCollection
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<QueryFunction>
-
- com.bayesserver.inference.DefaultQueryFunctionCollection
-
- All Implemented Interfaces:
QueryFunctionCollection
,Iterable<QueryFunction>
,Collection<QueryFunction>
,List<QueryFunction>
public final class DefaultQueryFunctionCollection extends AbstractList<QueryFunction> implements QueryFunctionCollection
The collection of functions to be evaluated by aInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput)
. SeeQueryDistributionCollection
.
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description DefaultQueryFunctionCollection(Network network)
Initializes a new instance of theDefaultQueryFunctionCollection
class, passing the target Bayesian network as a parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, QueryFunction item)
QueryFunction
add(QueryFunctionOutput function)
Adds the specified function, automatically creating aQueryFunction
instance.void
clear()
QueryFunction
get(int index)
Network
getNetwork()
Gets theNetwork
that is the target for aInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput)
.QueryFunction
remove(int index)
QueryFunction
set(int index, QueryFunction item)
int
size()
-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, addAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
-
-
-
-
Constructor Detail
-
DefaultQueryFunctionCollection
public DefaultQueryFunctionCollection(Network network)
Initializes a new instance of theDefaultQueryFunctionCollection
class, passing the target Bayesian network as a parameter.- Parameters:
network
- The network that will be the target of theInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput)
.
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceCollection<QueryFunction>
- Specified by:
size
in interfaceList<QueryFunction>
- Specified by:
size
in classAbstractCollection<QueryFunction>
-
add
public void add(int index, QueryFunction item)
- Specified by:
add
in interfaceList<QueryFunction>
- Overrides:
add
in classAbstractList<QueryFunction>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<QueryFunction>
- Specified by:
clear
in interfaceList<QueryFunction>
- Overrides:
clear
in classAbstractList<QueryFunction>
-
add
public QueryFunction add(QueryFunctionOutput function)
Adds the specified function, automatically creating aQueryFunction
instance.- Specified by:
add
in interfaceQueryFunctionCollection
- Parameters:
function
- The function to evaluate.- Returns:
- The automatically created
QueryFunction
instance.
-
remove
public QueryFunction remove(int index)
- Specified by:
remove
in interfaceList<QueryFunction>
- Overrides:
remove
in classAbstractList<QueryFunction>
-
set
public QueryFunction set(int index, QueryFunction item)
- Specified by:
set
in interfaceList<QueryFunction>
- Overrides:
set
in classAbstractList<QueryFunction>
-
get
public QueryFunction get(int index)
- Specified by:
get
in interfaceList<QueryFunction>
- Specified by:
get
in classAbstractList<QueryFunction>
-
getNetwork
public Network getNetwork()
Gets theNetwork
that is the target for aInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput)
.
-
-