refactor SigmaPi layer for generating several nodes with different
constrains. Constrains are implemented now through functor and
its corresponding function call operators.