LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
LocARNA::FitOnOff Class Reference

Implements fitting of a two-step function to a number sequence. More...

#include <fitonoff.hh>

List of all members.

Public Member Functions

 FitOnOff (numseq_t &x_, double delta_01_, double delta_10_, double beta_)
double viterbi (double c0, double c1, bool traceback)
double best_once_on (double c0, double c1)
pf_t forward (double c0, double c1)
std::pair< double, double > optimize (double c0, double c1)
void write_viterbi_path_compact (std::ostream &out, double c0, double c1)
 writes the ranges in the viterbi path
void write_viterbi_path (std::ostream &out, double c0, double c1) const
 writes the viterbi path
void print_table (const std::string &name, const std::vector< bool > &v) const
void print_table (const std::string &name, const std::vector< pf_t > &v) const
void print_tables () const

Detailed Description

Implements fitting of a two-step function to a number sequence.


Constructor & Destructor Documentation

LocARNA::FitOnOff::FitOnOff ( numseq_t &  x_,
double  delta_01_,
double  delta_10_,
double  beta_ 
) [inline]

construct with parameters

Parameters:
x_number sequence that we want to fit
delta_01_penalty for change from a to b
delta_10_penalty for change from b to a
beta_is the inverse temperature

Member Function Documentation

double LocARNA::FitOnOff::best_once_on ( double  c0,
double  c1 
)

best path that is "on" (=c1) exactly once

Parameters:
c0off-value
c1on-value
Returns:
score of best path post: best path is in trace
pf_t LocARNA::FitOnOff::forward ( double  c0,
double  c1 
)

compute forward partition functions fills tables v

std::pair< double, double > LocARNA::FitOnOff::optimize ( double  c0,
double  c1 
)

optimize c0 and c1 by gradient optimization

Returns:
optimal c0 and c1
void LocARNA::FitOnOff::print_table ( const std::string &  name,
const std::vector< bool > &  v 
) const

Print boolean vector to cout

Parameters:
nameIdentifier name to be printed
vVector
void LocARNA::FitOnOff::print_table ( const std::string &  name,
const std::vector< pf_t > &  v 
) const

Print vector of partition functions (pf_t) to cout

Parameters:
nameIdentifier name to be printed
vVector

Print DP-tables for debugging to cout

See also:
print_table()
double LocARNA::FitOnOff::viterbi ( double  c0,
double  c1,
bool  traceback 
)

compute the viterbi score (and optionally path) fills tables v, optionally compute t and trace

Parameters:
c0off-value
c1on-value
tracebackwhether to perform traceback

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends