randomSAT: fixed random sat generation; satlabcxx: fixed *2bson converters
This commit is contained in:
@@ -13,7 +13,7 @@ namespace satlab
|
||||
template<typename = bsoncxx::builder::stream::array, typename = KSATinstance::MODEL>
|
||||
void convert(bsoncxx::builder::stream::array& builder, const KSATinstance::MODEL& model)
|
||||
{
|
||||
builder = bsoncxx::builder::stream::array();
|
||||
builder.clear();
|
||||
|
||||
for(auto& lit : model)
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ void convert(bsoncxx::builder::stream::document& builder, const MinisatResult& r
|
||||
using ARRAY_BUILDER = bsoncxx::builder::stream::array;
|
||||
using DOCUMENT_BUILDER = bsoncxx::builder::stream::document;
|
||||
|
||||
builder = DOCUMENT_BUILDER();
|
||||
builder.clear();
|
||||
|
||||
ARRAY_BUILDER model;
|
||||
DOCUMENT_BUILDER stats;
|
||||
|
@@ -13,7 +13,7 @@ namespace satlab
|
||||
template<typename = bsoncxx::builder::stream::document, typename = MinisatStats>
|
||||
void convert(bsoncxx::builder::stream::document& builder, const MinisatStats& stats)
|
||||
{
|
||||
builder = bsoncxx::builder::stream::document();
|
||||
builder.clear();
|
||||
|
||||
builder << "solves" << static_cast<int>(stats.getSolves())
|
||||
<< "starts" << static_cast<int>(stats.getStarts())
|
||||
|
Reference in New Issue
Block a user