XJ music engine
1.9.6
In-game runtime engine for XJ music.
|
#include <MemeIsometry.h>
Public Member Functions | |
MemeIsometry (MemeTaxonomy taxonomy, const std::set< std::string > &sourceMemes) | |
int | score (const std::set< std::string > &targets) const |
void | add (const std::string &meme) |
void | add (const ProgramMeme &meme) |
void | add (const ProgramSequenceBindingMeme &meme) |
void | add (const InstrumentMeme &meme) |
void | add (const SegmentMeme &meme) |
bool | isAllowed (const std::set< std::string > &memes) const |
std::set< std::string > | getSources () |
std::string | getConstellation () const |
Static Public Member Functions | |
static MemeIsometry | of (MemeTaxonomy taxonomy, const std::set< std::string > &sourceMemes) |
static MemeIsometry | of (const std::set< std::string > &sourceMemes) |
static MemeIsometry | none () |
Determine the isometry between a source and target group of Memes
|
explicit |
Construct a meme isometry from source memes
taxonomy | context within which to measure isometry |
sourceMemes | from which to construct isometry |
void MemeIsometry::add | ( | const InstrumentMeme & | meme | ) |
Add a instrument meme for isometry comparison
void MemeIsometry::add | ( | const ProgramMeme & | meme | ) |
Add a program meme for isometry comparison
void MemeIsometry::add | ( | const ProgramSequenceBindingMeme & | meme | ) |
Add a program sequence binding meme for isometry comparison
void MemeIsometry::add | ( | const SegmentMeme & | meme | ) |
Add a segment meme for isometry comparison
void MemeIsometry::add | ( | const std::string & | meme | ) |
Add a meme for isometry comparison
std::string MemeIsometry::getConstellation | ( | ) | const |
Compute normalized string representation of an unordered set of memes for the purpose of identifying unique constellations.
for each unique sequence-pattern-meme constellation within the main sequence https://github.com/xjmusic/xjmusic/issues/208
std::set< std::string > MemeIsometry::getSources | ( | ) |
Get the source Memes
bool MemeIsometry::isAllowed | ( | const std::set< std::string > & | memes | ) | const |
Whether a list of memes is allowed because no more than one matches the category's memes
memes | The list of memes to check |
|
static |
Instantiate a new MemeIsometry representing having no memes
|
static |
Instantiate a new MemeIsometry of a group of source Memes
sourceMemes | to compare of |
|
static |
Instantiate a new MemeIsometry of a Taxonomy and group of source Memes
taxonomy | context within which to measure isometry |
sourceMemes | to compare of |
int MemeIsometry::score | ( | const std::set< std::string > & | targets | ) | const |
Score a CSV list of memes based on isometry to source memes
targets | comma-separated values to score against source meme names |