@ -31,26 +31,38 @@ PANTHEIOS_EXTERN_C PAN_CHAR_T const PANTHEIOS_FE_PROCESS_IDENTITY[] = "mrmc-cpp"
# include "src/utility/settings.h"
# include "src/utility/settings.h"
# include "Eigen/Sparse"
# include "Eigen/Sparse"
# include "src/exceptions/InvalidSettings.h"
int main ( const int argc , const char * argv [ ] ) {
int main ( const int argc , const char * argv [ ] ) {
// Logging init
// Logging init
pantheios_be_file_setFilePath ( " log.all " ) ;
pantheios_be_file_setFilePath ( " log.all " ) ;
pantheios : : log_INFORMATIONAL ( " MRMC-Cpp started. " ) ;
pantheios : : log_INFORMATIONAL ( " MRMC-Cpp started. " ) ;
mrmc : : settings : : Settings s ( argc , argv , NULL ) ;
mrmc : : settings : : Settings * s = NULL ;
try
{
s = new mrmc : : settings : : Settings ( argc , argv , NULL ) ;
}
catch ( mrmc : : exceptions : : InvalidSettings )
{
std : : cout < < " Could not recover from settings error, terminating. " < < std : : endl ;
return 1 ;
}
if ( s . isSet ( " help " ) )
if ( s - > isSet ( " help " ) )
{
{
std : : cout < < s . getHelpForCommandline ( ) < < std : : endl ;
std : : cout < < s - > getHelpForCommandline ( ) < < std : : endl ;
return 0 ;
return 0 ;
}
}
if ( s . isSet ( " help-config " ) )
if ( s - > isSet ( " help-config " ) )
{
{
std : : cout < < s . getHelpForConfigfile ( ) < < std : : endl ;
std : : cout < < s - > getHelpForConfigfile ( ) < < std : : endl ;
return 0 ;
return 0 ;
}
}
mrmc : : sparse : : StaticSparseMatrix < double > * probMatrix = mrmc : : parser : : read_tra_file ( s . getString ( " trafile " ) . c_str ( ) ) ;
mrmc : : models : : AtomicPropositionsLabeling * labeling = mrmc : : parser : : read_lab_file ( probMatrix - > getRowCount ( ) , s . getString ( " labfile " ) . c_str ( ) ) ;
mrmc : : sparse : : StaticSparseMatrix < double > * probMatrix = mrmc : : parser : : read_tra_file ( s - > getString ( " trafile " ) . c_str ( ) ) ;
mrmc : : models : : AtomicPropositionsLabeling * labeling = mrmc : : parser : : read_lab_file ( probMatrix - > getRowCount ( ) , s - > getString ( " labfile " ) . c_str ( ) ) ;
mrmc : : models : : Dtmc < double > dtmc ( probMatrix , labeling ) ;
mrmc : : models : : Dtmc < double > dtmc ( probMatrix , labeling ) ;