added check for negative edge length, also minor documentation
added check for negative edge length, also minor documentation

twmb/algoimpl,postfix/algoimpl,postfix/algoimpl,twmb/algoimpl,postfix/algoimpl,twmb/algoimpl,postfix/algoimpl