Added assertion for makeAdjMat function