Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sequence_analysis/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ options = Variables(['../options.py', 'options.py'], ARGUMENTS)
options.Add(BoolVariable('with_efence', 'build tests with efence library', 0))
options.Add(BoolVariable('DEBUG', 'my debug', 0))

tools = ['boost_python', 'qt4', 'vplants.tool', 'install', 'vplants.stat_tool']
tools = ['boost_python', 'vplants.stat_tool'] #'qt4', 'vplants.tool', 'install',

env = ALEASolution(options, tools)
env.AppendUnique(CXXFLAGS=['-x', 'c++', '-std=c++0x'])
Expand Down
9 changes: 5 additions & 4 deletions sequence_analysis/src/cpp/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bn = os.path.basename
Import( "env" )

lib_env = env.Clone()
lib_env.EnableQt4Modules(['QtCore','QtOpenGL', 'QtGui'])
#lib_env.EnableQt4Modules(['QtCore','QtOpenGL', 'QtGui'])

# Import / Export symbols for windows dll
if lib_env['compiler'] == 'mingw':
Expand All @@ -15,7 +15,7 @@ if lib_env['compiler'] == 'mingw':
"-enable-runtime-pseudo-reloc",
"-s"]
lib_env.AppendUnique(LINKFLAGS=LINKFLAGS)


includes= lib_env.ALEAGlob('*.h')
includes += lib_env.ALEAGlob('*.hpp')
Expand All @@ -25,15 +25,16 @@ sources = lib_env.ALEAGlob('*.cpp')
excludes = Split( """
""")

for f in excludes:
for f in excludes:
for cpp in sources:
if f in cpp:
sources.remove(cpp)
break

# Add defines to export symbols
lib_env.AppendUnique(CPPDEFINES=['MESSAGE'])
lib_env.AppendUnique(LIBS=['vptool', 'vpstat_tool'])
#lib_env.AppendUnique(LIBS=['vptool', 'vpstat_tool'])
lib_env.AppendUnique(LIBS=['vpstat_tool'])

if lib_env['DEBUG']:
lib_env.Append(CPPDEFINES= ['DEBUG'])
Expand Down
8 changes: 5 additions & 3 deletions sequence_analysis/src/wrapper/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os

Import("env")

env.EnableQt4Modules(['QtCore','QtOpenGL', 'QtGui'])
#env.EnableQt4Modules(['QtCore','QtOpenGL', 'QtGui'])

# Export symbols under windows
if env['compiler'] == 'mingw':
Expand All @@ -20,11 +20,13 @@ if env['compiler'] == 'mingw':
sources = env.ALEAGlob('*.h')
sources = env.ALEAGlob('*.cpp')

LIBS = ['vptool', 'vpstat_tool', 'vpsequence']
#LIBS = ['vptool', 'vpstat_tool', 'vpsequence']
LIBS = ['vpstat_tool', 'vpsequence']
env.AppendUnique(LIBS=LIBS)

env.AppendUnique(CPPDEFINES=['MESSAGE'])
env.AppendUnique(LIBS=['vptool', 'vpstat_tool', 'vpsequence'])
#env.AppendUnique(LIBS=['vptool', 'vpstat_tool', 'vpsequence'])
env.AppendUnique(LIBS=['vpstat_tool', 'vpsequence'])

env.ALEAWrapper("../sequence_analysis", "_sequence_analysis", sources)

5 changes: 3 additions & 2 deletions sequence_analysis/src/wrapper/boost_python_aliases.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#define FOOTER_OS \
if (!ret) \
sequence_analysis::wrap_util::throw_error(error);\
cout << os.str() << endl;\
//cout << os.str() << endl;\
return ret;\

#define FOOTER \
Expand All @@ -64,7 +64,8 @@
#define HEADER_OS(TYPE) \
StatError error; \
TYPE* ret;\
std::stringstream os;\
bool os = true; \
//std::stringstream os;\



Expand Down
1 change: 0 additions & 1 deletion sequence_analysis/src/wrapper/export_correlation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include "sequence_analysis/sequences.h"
#include "sequence_analysis/sequence_label.h"
#include "tool/config.h"

#include <boost/python.hpp>
#include <boost/python/extract.hpp>
Expand Down
5 changes: 0 additions & 5 deletions sequence_analysis/src/wrapper/export_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
#include <math.h>
#include <iomanip>
#include <sstream>
#include <tool/rw_tokenizer.h>
#include <tool/rw_cstring.h>
#include <tool/rw_locale.h>

#include "tool/config.h"

#include "stat_tool/stat_label.h"

Expand Down
5 changes: 2 additions & 3 deletions sequence_analysis/src/wrapper/export_hidden_semi_markov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "wrapper_util.h"

#include "tool/config.h"

#include "stat_tool/stat_label.h"

#include "sequence_analysis/hidden_semi_markov.h"
Expand Down Expand Up @@ -82,7 +80,8 @@ class WRAP {
state_sequence_computation(const HiddenSemiMarkov &input,
const MarkovianSequences &seq, bool characteristic_flag = true)
{
std:stringstream os;
//std:stringstream os;
bool os = true; // display
SIMPLE_METHOD_TEMPLATE_1(input, state_sequence_computation,
SemiMarkovData, os, seq, characteristic_flag);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "wrapper_util.h"

#include "tool/config.h"

#include "stat_tool/stat_label.h"

#include "sequence_analysis/hidden_variable_order_markov.h"
Expand Down
34 changes: 20 additions & 14 deletions sequence_analysis/src/wrapper/export_markovian_sequences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class WRAP {
cluster_step(const MarkovianSequences &seq, int variable, int step, int imode)
{
StatError error;

MarkovianSequences *ret = NULL;

rounding rmode = rounding(imode);
ret = seq.cluster(error, variable, step, rmode);
if (!ret)
Expand Down Expand Up @@ -231,7 +231,8 @@ class WRAP {
const char *path = 0)
{
StatError error;
std::stringstream os;
// std::stringstream os;
bool os = true; // display
bool ret = true;

ret = input.transition_count(error, os,
Expand All @@ -244,7 +245,8 @@ class WRAP {
int begin_state, int end_state, int min_frequency)
{
StatError error;
std::stringstream os;
//std::stringstream os;
bool os = true; //display
bool ret = true;

ret = input.word_count(error, os ,variable, word_length,
Expand All @@ -253,7 +255,7 @@ class WRAP {
if (!ret)
sequence_analysis::wrap_util::throw_error(error);
//todo if this what we want to return ?
return os.str();
return string();
}


Expand All @@ -266,7 +268,7 @@ class WRAP {
process_type itype = process_type(iitype);
memory_tree_selection algorithm = memory_tree_selection(ialgorithm);
transition_estimator estimator = transition_estimator(iestimator);

HEADER_OS(VariableOrderMarkov);
ret = input.variable_order_markov_estimation(error, os, itype,
min_order, max_order, algorithm, threshold, estimator,
Expand Down Expand Up @@ -354,7 +356,8 @@ class WRAP {
{
StatError error;
bool ret = false;
std::stringstream os;
//std::stringstream os;
bool os = true; // display

CREATE_ARRAY(input_markov, const VariableOrderMarkov*, data);
ret = input.comparison(error, os, data_size, data.get(), filename);
Expand All @@ -366,7 +369,8 @@ class WRAP {
boost::python::list &input_markov, char *filename)
{
StatError error;
std::stringstream os;
//std::stringstream os;
bool os = true; // display
bool ret = false;

CREATE_ARRAY(input_markov, const SemiMarkov*, data);
Expand All @@ -379,7 +383,8 @@ class WRAP {
boost::python::list &input_markov, latent_structure_algorithm algorithm, const char *filename)
{
StatError error;
std::stringstream os;
//std::stringstream os;
bool os = true; // display
bool ret = false;

CREATE_ARRAY(input_markov, const HiddenVariableOrderMarkov*, data);
Expand All @@ -394,7 +399,8 @@ class WRAP {
const char *filename)
{
StatError error;
std::stringstream os;
//std::stringstream os;
bool os = true; // display
bool ret = false;

CREATE_ARRAY(input_markov, const HiddenSemiMarkov*, markov);
Expand Down Expand Up @@ -508,8 +514,8 @@ class WRAP {
{
StatError error;
bool ret;
std::stringstream os;

// std::stringstream os;
bool os = true; // display
CREATE_ARRAY(input_values, int, data);
ret = input.lumpability_test(error, os, data.get(), order);
FOOTER_OS;
Expand All @@ -526,7 +532,7 @@ class WRAP {
static SequenceCharacteristics *
get_characteristics(const MarkovianSequences &input, const int variable)
{
// todo : shall we return something ?
// todo : shall we return something ?
HEADER(SequenceCharacteristics);
ret = input.get_characteristics(variable);
FOOTER;
Expand All @@ -542,7 +548,7 @@ class WRAP {
return ret;
}

static MarkovianSequences*
static MarkovianSequences*
initial_run_computation(const MarkovianSequences &input)
{
HEADER(MarkovianSequences);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "wrapper_util.h"

#include "tool/config.h"

#include "stat_tool/stat_label.h"

#include "sequence_analysis/nonhomogeneous_markov.h"
Expand Down
2 changes: 0 additions & 2 deletions sequence_analysis/src/wrapper/export_semi_markov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "wrapper_util.h"

#include "tool/config.h"

#include "stat_tool/stat_label.h"

#include "sequence_analysis/semi_markov.h"
Expand Down
Loading