Crystal AI  1.0.0
Crystal.SequentialSelector Class Reference

This selector returns all indices in sequence from the given T:System.Collections.ICollection of T:Crystal.Utility. The assumption here is that every time the collection size is the same. If that is not the case, then the count is reset and starts from 0. More...

Inheritance diagram for Crystal.SequentialSelector:
Crystal.ISelector Crystal.IAiPrototype< ISelector >

Public Member Functions

int Select (ICollection< Utility > elements)
 Selects a T:Crystal.Utility from the given set and returns its index. More...
 
ISelector Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 
- Public Member Functions inherited from Crystal.IAiPrototype< ISelector >
Clone ()
 Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
 

Detailed Description

This selector returns all indices in sequence from the given T:System.Collections.ICollection of T:Crystal.Utility. The assumption here is that every time the collection size is the same. If that is not the case, then the count is reset and starts from 0.

See also
T:Crystal.ISelector

Member Function Documentation

ISelector Crystal.SequentialSelector.Clone ( )
inline

Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state!

Returns
int Crystal.SequentialSelector.Select ( ICollection< Utility elements)
inline

Selects a T:Crystal.Utility from the given set and returns its index.

Parameters
elementsThe elements.
Returns
The index of the selected utility. This returns -1 no selection was made or if the count of elements was 0.

Implements Crystal.ISelector.


The documentation for this class was generated from the following file: