X-Git-Url: https://ruin.nu/git/?p=germs.git;a=blobdiff_plain;f=src%2Fmisc.h;fp=src%2Fmisc.h;h=76f722f05ad75212af17613999cdf8a1aeae75c9;hp=ee0b57814bbd0874d3569621a950e725356ec66f;hb=4462cded18dd80075c3622e5a87ca6f5f3c84f62;hpb=43b1052d74a207fe667b75e41d0c70c1189c2cc8 diff --git a/src/misc.h b/src/misc.h index ee0b578..76f722f 100644 --- a/src/misc.h +++ b/src/misc.h @@ -21,8 +21,15 @@ #ifndef __MISC_H__ #define __MISC_H__ +/** + * The type we use for genes, has to be a signed integer type. + */ typedef int Gene; +/** + * Simple struct for components. Holds the indexes, the first and last genes + * + information if the component is unoriented. + */ struct Component{ Component(int b = 0,int e = 0,int s = 0,size_t i1 = 0, size_t i2 = 0):begin(b),end(e),sign(s),i1(i1), i2(i2){} bool operator==(const Component& c){