pub fn new(
            transition: RefCell<Array2<LogProb>>,
            observation: RefCell<Array2<LogProb>>,
            initial: RefCell<Array1<LogProb>>,
            end: RefCell<Array1<LogProb>>,
            has_end_state: bool,
        ) -> Result<Self> {
            let (an0, an1) = transition.borrow().dim();
            let (bn, bm) = observation.borrow().dim();
            let pin = initial.borrow().dim();

            if an0 != an1 || an0 != bn || an0 != pin {
                Err(Error::InvalidDimension {
                    an0,
                    an1,
                    bn,
                    bm,
                    pin,
                })
            } else {
                Ok(Self {
                    transition,
                    observation,
                    initial,
                    end,
                    has_end_state,
                })
            }
        }
/// Construct new Hidden MarkovModel with the given transition, observation, and initial
/// state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition, observation, and initial
state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition observation and initial state matrices and vectors already in log - probability space .
pub fn new(
            transition: RefCell<Array2<LogProb>>,
            observation: RefCell<Array2<LogProb>>,
            initial: RefCell<Array1<LogProb>>,
            end: RefCell<Array1<LogProb>>,
            has_end_state: bool,
        ) -> Result<Self> {
            let (an0, an1) = transition.borrow().dim();
            let (bn, bm) = observation.borrow().dim();
            let pin = initial.borrow().dim();
            if an0 != an1 || an0 != bn || an0 != pin {
                Err(Error::InvalidDimension {
                    an0,
                    an1,
                    bn,
                    bm,
                    pin,
                })
            } else {
                Ok(Self {
                    transition,
                    observation,
                    initial,
                    end,
                    has_end_state,
                })
            }
        }
pub fn new ( transition : RefCell < Array2 < LogProb > > , observation : RefCell < Array2 < LogProb > > , initial : RefCell < Array1 < LogProb > > , end : RefCell < Array1 < LogProb > > , has_end_state : bool , ) -> Result < Self > { let ( an0 , an1 ) = transition . borrow ( ) . dim ( ) ; let ( bn , bm ) = observation . borrow ( ) . dim ( ) ; let pin = initial . borrow ( ) . dim ( ) ; if an0 != an1 || an0 != bn || an0 != pin { Err ( Error :: InvalidDimension { an0 , an1 , bn , bm , pin , } ) } else { Ok ( Self { transition , observation , initial , end , has_end_state , } ) } }
Construct new Hidden MarkovModel with the given transition, observation, and initial
state matrices and vectors already in log-probability space.
Construct new Hidden MarkovModel with the given transition observation and initial state matrices and vectors already in log - probability space .
transition
RefCell<Array2<LogProb>>
observation
RefCell<Array2<LogProb>>
initial
RefCell<Array1<LogProb>>
end
RefCell<Array1<LogProb>>
has_end_state
bool
transition
RefCell<Array2<LogProb>>
observation
RefCell<Array2<LogProb>>
initial
RefCell<Array1<LogProb>>
end
RefCell<Array1<LogProb>>
has_end_state
bool