revrt 0.1.1

A library for optimizing transmission infrastructure for electrical grid.
Documentation
//! Routing solution representation

#[allow(missing_docs, dead_code)]
#[derive(Debug)]
/// Solution for one single routing case
///
pub struct Solution<I, C> {
    pub(crate) route: Vec<I>,
    pub(crate) total_cost: C,
}

impl<I, C> Solution<I, C> {
    #[allow(dead_code, missing_docs)]
    pub(crate) fn new(route: Vec<I>, total_cost: C) -> Self {
        Self { route, total_cost }
    }

    #[allow(dead_code, missing_docs)]
    pub fn route(&self) -> &Vec<I> {
        &self.route
    }

    #[allow(dead_code, missing_docs)]
    pub fn total_cost(&self) -> &C {
        &self.total_cost
    }
}

pub type RevrtRoutingSolutions = Vec<Solution<crate::ArrayIndex, f32>>;