[−][src]Struct graco::ant::Ant
Fields
number: usize
visited_nodes: Vec<usize>
visited_edges: Vec<usize>
edge_weight: f64
Methods
impl Ant
[src]
pub fn from_node(
number: usize,
node_idx: usize,
seed: u64,
obj: Objective
) -> Ant
[src]
number: usize,
node_idx: usize,
seed: u64,
obj: Objective
) -> Ant
pub fn move_prob<N: 'static + Clone + Display + Debug + PartialEq + Send, Ty: 'static + Clone + EdgeType + Send>(
&self,
colony: &Colony<N, Ty>,
from: usize,
to: usize
) -> f64
[src]
&self,
colony: &Colony<N, Ty>,
from: usize,
to: usize
) -> f64
pub fn move_ant<N: 'static + Clone + Display + Debug + PartialEq + Send, Ty: 'static + Clone + EdgeType + Send>(
&mut self,
colony: &Colony<N, Ty>
) -> bool
[src]
&mut self,
colony: &Colony<N, Ty>
) -> bool
Moves an ant to the next node. Returns false when the objective is satisfied.
pub fn remove_cycles<N: 'static + Clone + Display + Debug + PartialEq + Send, Ty: 'static + Clone + EdgeType + Send>(
&mut self,
colony: &Colony<N, Ty>
)
[src]
&mut self,
colony: &Colony<N, Ty>
)
Remove any cycles and updates the cost function
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ant
impl Send for Ant
impl Sync for Ant
impl Unpin for Ant
impl UnwindSafe for Ant
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,