A library to scatter things accross a cluster depending on weights
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
475 B

#include "catch.hpp"
#include "scatter/scatter.h"
#include <iostream>
TEST_CASE("Storage tree")
{
StorageTree::root n;
StorageTree::add_rule(n,25,0,0,0,0,0,0);
StorageTree::add_rule(n,25,0,0,0,1,0,0);
StorageTree::add_rule(n,25,0,0,0,1,0,1);
StorageTree::add_rule(n,25,0,0,0,1,0,2);
std::cout<<"Total weight="<<StorageTree::total_weight<StorageTree::root>(n)<<std::endl;
StorageTree::update_weights(n,StorageTree::total_weight<StorageTree::root>(n));
}