It can be printed directly on the output console :
┌ Epsilon
├─── Zeta
┌─ Beta ┤
│ ├──── Eta
│ │ ┌───── Mu
│ └── Theta ┤
│ └───── Nu
Alpha ┼ Gamma ────── Xi ─ Omicron
│ ┌─── Iota
└ Delta ┼── Kappa
└─ Lambda
You can define relations between nodes in the
edges.json
file.
{
"Alpha": {
"Beta": {
"Epsilon": {},
"Zeta": {},
"Eta": {},
"Theta": {
"Mu": {},
"Nu": {}
}
},
"Gamma": {
"Xi": {
"Omicron": {}
}
},
"Delta": {
"Iota": {},
"Kappa": {},
"Lambda": {}
}
}
}
You can also use your own tree representation, the Tree
class needs only an
adjacency table to work:
int main() {
...
Tree(adjacences).show(root);
}
Made by Adrien Jayat.