Skip to content

Commit e43d737

Browse files
author
Adrian Duong
committed
Update to allow compilation with libDAI 0.3.0
* Added gmpxx and gmp to libs * Updated calls to dai::tokenizeString to work with libDAI 0.3.0
1 parent 21f38c6 commit e43d737

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Diff for: configuration.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ RunConfiguration::addConfigurations(std::istream& is)
6060
std::set<PropertyKey>::iterator i = keys.begin();
6161
EMStep e;
6262
for ( ; i != keys.end(); ++i) {
63-
std::vector< std::string > edges;
64-
tokenizeString(conf.getAs<std::string>(*i), edges, ";");
63+
std::vector< std::string > edges = tokenizeString(conf.getAs<std::string>(*i), true, ";");
6564
SmallSet< std::string > s(edges.begin(), edges.end(), edges.size());
6665
e[*i] = s;
6766
}

Diff for: makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ VERSION:=$(shell git describe --always) $(shell git diff --shortstat)
1616
CPPFLAGS=-O3 -W -Wall -Wextra -fPIC ${CCINC} -D'VERSION="${VERSION}"'
1717
LIBDAIFLAGS=-DDAI_WITH_BP -DDAI_WITH_MF -DDAI_WITH_HAK -DDAI_WITH_LC -DDAI_WITH_TREEEP -DDAI_WITH_JTREE -DDAI_WITH_MR -DDAI_WITH_GIBBS
1818
LIB_DIR=-L${LIBDAI_LIB}
19-
LIBS=-ldai
19+
LIBS=-ldai -lgmpxx -lgmp
2020
LIBFLAGS=${LIBDAIFLAGS} ${LIB_DIR} ${LIBS}
2121
CPPFLAGS +=${LIBDAIFLAGS}
2222
DEPDIR=.deps

Diff for: pathwaytab.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ void readInteractionMap(istream& is,
127127
map< string, vector< string > >& out_imap) {
128128
string line;
129129
while(getline(is, line)) {
130-
vector< string > vals;
131-
dai::tokenizeString(line, vals);
130+
vector< string > vals = dai::tokenizeString(line, true);
132131
if (vals.size() != 4) {
133132
THROW("Interaction map lines must have 4 entries");
134133
}
@@ -142,8 +141,7 @@ GeneProteinExpressionModel::GeneProteinExpressionModel(istream& is)
142141
: _states(), _steps() {
143142
string line;
144143
while(getline(is, line)) {
145-
vector<string> vals;
146-
dai::tokenizeString(line, vals);
144+
vector<string> vals = dai::tokenizeString(line, true);
147145
if (vals.size() != 3) {
148146
THROW("Must have three values per line in central dogma");
149147
}
@@ -187,8 +185,7 @@ PathwayTab::PathwayTab(istream& pathway_stream,
187185
readInteractionMap(imap_stream, _imap);
188186

189187
while(getline(pathway_stream, line)) {
190-
vector< string > vals;
191-
dai::tokenizeString(line, vals);
188+
vector< string > vals = dai::tokenizeString(line, true);
192189
if (vals.size() == 2) {
193190
entity_lines.push_back(vals);
194191
} else if (vals.size() == 3) {

0 commit comments

Comments
 (0)