-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
julien.rodriguez-tao
committed
Oct 21, 2017
1 parent
fd0388a
commit 0dc160d
Showing
9 changed files
with
132 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "geneticdata.h" | ||
|
||
GeneticData::GeneticData() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#ifndef GENETICDATA_H | ||
#define GENETICDATA_H | ||
|
||
#include <vector> | ||
#include <deque> | ||
#include <stdint.h> | ||
#include <stddef.h> | ||
using namespace std; | ||
|
||
#define NCMD 4 | ||
|
||
class GeneticBase | ||
{ | ||
public: | ||
int8_t *data; | ||
uint8_t size; | ||
|
||
GeneticBase() {data=NULL;} | ||
GeneticBase(int8_t *_data, uint8_t _size) : data(_data),size(_size) {} | ||
}; | ||
|
||
class GeneticData | ||
{ | ||
public: | ||
|
||
deque<GeneticBase> data; | ||
|
||
GeneticData(); | ||
|
||
}; | ||
|
||
class GeneticLowlevelGrammar | ||
{ | ||
public : | ||
|
||
GeneticLowlevelGrammar() | ||
{ | ||
} | ||
|
||
int TranslateLLCode(GeneticBase *gb, int pos) | ||
{ | ||
switch (gb->data[0]) | ||
{ | ||
case 0://end transcription | ||
{ | ||
return 256; | ||
} | ||
break; | ||
|
||
case 1://test and branch instruction | ||
{ | ||
if (pos<*(gb->data+1)) | ||
return *(gb->data+2); | ||
else | ||
return 1; | ||
} | ||
break; | ||
|
||
default: //high level command | ||
return 1; | ||
break; | ||
} | ||
|
||
} | ||
|
||
}; | ||
|
||
#endif // GENETICDATA_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "linkcell.h" | ||
|
||
LinkCell::LinkCell() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef LINKCELL_H | ||
#define LINKCELL_H | ||
|
||
#include <vector> | ||
using namespace std; | ||
|
||
class LinkCell | ||
{ | ||
public: | ||
LinkCell(); | ||
|
||
|
||
}; | ||
|
||
#endif // LINKCELL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters