Skip to content

Instantly share code, notes, and snippets.

@DylanLukes
Created October 29, 2010 12:37
Show Gist options
  • Save DylanLukes/653469 to your computer and use it in GitHub Desktop.
Save DylanLukes/653469 to your computer and use it in GitHub Desktop.
typedef enum {
NullaryNode = 0,
UnaryNode = 1,
BinaryNode = 2,
TernaryNode = 3
} NodeType;
typedef struct node_struct Node;
struct node_struct {
int pheromoneA;
int pheromoneB;
NodeType type;
union {
struct {
Node *next;
};
struct {
Node *next;
Node *prev;
};
struct {
Node *nodeA;
Node *nodeB;
Node *nodeC;
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment