rename const
sturct style
better naming
support adj table
generate matrix only once