Add neighbor.m.
Finish tricot.m.
Finish compweight.m.
Add comparap.m.
WARNING: this function is not tested yet.