Cosmetic fixes

This commit is contained in:
Tiago Gomes
2012-12-27 12:54:58 +00:00
parent 8bdcb65907
commit cbea630fbf
39 changed files with 106 additions and 138 deletions

View File

@@ -1,13 +1,13 @@
#include <set>
#include <vector>
#include <algorithm>
#include <set>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <fstream>
#include "FactorGraph.h"
#include "Factor.h"
#include "BayesBall.h"
#include "Util.h"
@@ -146,7 +146,7 @@ FactorGraph::readFromLibDaiFormat (const char* fileName)
ignoreLines (is);
is >> ranges[j];
VarNode* var = getVarNode (vids[j]);
if (var != 0 && ranges[j] != var->range()) {
if (var && ranges[j] != var->range()) {
cerr << "Error: variable `" << vids[j] << "' appears in two or " ;
cerr << "more factors with a different range." << endl;
}