implementation of node triad census algorithm

optimizations to come