|
CycloBranch
|
The database of building blocks. More...
#include <iostream>#include <fstream>#include <vector>#include <string>#include <algorithm>#include <iomanip>#include "core/utilities.h"#include "core/cBrick.h"#include "core/cSummaryFormula.h"Go to the source code of this file.
Classes | |
| class | cBricksDatabase |
| The class representing a database of building blocks (bricks). More... | |
Functions | |
| bool | compareBrickMasses (const cBrick &a, const cBrick &b) |
| Compare masses of two bricks. More... | |
| void | getNameOfCompositionFromIntVector (string &composition, vector< int > &combarray) |
| Convert vector of ids of bricks into a string. More... | |
| string & | getReversedNameOfCompositionFromStringVector (string &composition, vector< string > &stringcomposition) |
| Convert vector of ids of bricks into a string having reversed ids of bricks. More... | |
| void | generateBricksPermutations (vector< string > &bricks, vector< string > ¤tpermutation, vector< string > &permutations) |
| Generate permutations of bricks. More... | |
The database of building blocks.
Compare masses of two bricks.
| a | first brick |
| b | second brick |
| bool | true if the mass of a is less than the mass of b |
| void generateBricksPermutations | ( | vector< string > & | bricks, |
| vector< string > & | currentpermutation, | ||
| vector< string > & | permutations | ||
| ) |
Generate permutations of bricks.
| bricks | reference to an input vector of strings (ids of bricks) |
| currentpermutation | reference to an empty vector of strings (auxiliary parameter) |
| permutations | reference to an empty output vector of strings where the result will be stored |
| void getNameOfCompositionFromIntVector | ( | string & | composition, |
| vector< int > & | combarray | ||
| ) |
Convert vector of ids of bricks into a string.
| composition | reference to a string where ids of bricks separated by '-' will be stored |
| combarray | reference to an input integer vector of ids of bricks |
| string & getReversedNameOfCompositionFromStringVector | ( | string & | composition, |
| vector< string > & | stringcomposition | ||
| ) |
Convert vector of ids of bricks into a string having reversed ids of bricks.
| composition | reference to a string where ids of bricks separated by '-' will be stored |
| stringcomposition | reference to an input string vector of ids of bricks |
| string | reference to a string where ids of bricks separated by '-' will be stored |