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 theDefaultQueryFunctionCollectionclass, passing the target Bayesian network as a parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, QueryFunction item)QueryFunctionadd(QueryFunctionOutput function)Adds the specified function, automatically creating aQueryFunctioninstance.voidclear()QueryFunctionget(int index)NetworkgetNetwork()Gets theNetworkthat is the target for aInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput).QueryFunctionremove(int index)QueryFunctionset(int index, QueryFunction item)intsize()-
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 theDefaultQueryFunctionCollectionclass, 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:
sizein interfaceCollection<QueryFunction>- Specified by:
sizein interfaceList<QueryFunction>- Specified by:
sizein classAbstractCollection<QueryFunction>
-
add
public void add(int index, QueryFunction item)- Specified by:
addin interfaceList<QueryFunction>- Overrides:
addin classAbstractList<QueryFunction>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<QueryFunction>- Specified by:
clearin interfaceList<QueryFunction>- Overrides:
clearin classAbstractList<QueryFunction>
-
add
public QueryFunction add(QueryFunctionOutput function)
Adds the specified function, automatically creating aQueryFunctioninstance.- Specified by:
addin interfaceQueryFunctionCollection- Parameters:
function- The function to evaluate.- Returns:
- The automatically created
QueryFunctioninstance.
-
remove
public QueryFunction remove(int index)
- Specified by:
removein interfaceList<QueryFunction>- Overrides:
removein classAbstractList<QueryFunction>
-
set
public QueryFunction set(int index, QueryFunction item)
- Specified by:
setin interfaceList<QueryFunction>- Overrides:
setin classAbstractList<QueryFunction>
-
get
public QueryFunction get(int index)
- Specified by:
getin interfaceList<QueryFunction>- Specified by:
getin classAbstractList<QueryFunction>
-
getNetwork
public Network getNetwork()
Gets theNetworkthat is the target for aInference.query(com.bayesserver.inference.QueryOptions, com.bayesserver.inference.QueryOutput).
-
-