def cvToAdjMatrixRow(v, A_H): """ Returns the matrix line corresponding to a composite vertex :input composite vertex v in its symbolic tuple form, and MAG's Aspect list A_H :output numeric representation of the composite vertex The numeric representation of a composite vertex directly indicates its corresponding row and column on the adjacency matrix """ T_H = alg.CompTuple(A_H) return alg.D(idxV(v, A_H), T_H)
def adjMatrixRowToCv(n, A_H): """ Returns the composite vertex corresponding to a matrix line :input numeric representation of the composite vertex n, and MAG's Aspect list A_H :output composite vertex in its symbolic tuple form The numeric representation of a composite vertex directly indicates its corresponding row and column on the adjacency matrix This function is the inverse of cvToAdjMatrixRow """ T_H = alg.CompTuple(A_H) return invIdxV(alg.InvD(n, T_H), A_H)