28 fprintf(stderr,
"Calculating circuit model");
31 for (i = 0; i < nG; i++) {
33 for (j = 0; j < nG; j++)
38 return matinv(Gm, Gm_inv, nG - 1);
61 Gm[i][j] = Gm[j][i] = -1.0 /
ED_dist(e);
68 for (i = 0; i < nG; i++) {
69 for (j = 0; j < nG; j++) {
71 Gm_inv[i][i] + Gm_inv[j][j] - 2.0 * Gm_inv[i][j];
CGRAPH_API Agedge_t * agfstedge(Agraph_t *g, Agnode_t *n)
CGRAPH_API Agnode_t * agtail(Agedge_t *e)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API Agnode_t * aghead(Agedge_t *e)
void free_array(double **rv)
double ** new_array(int i, int j, double val)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
CGRAPH_API Agedge_t * agnxtedge(Agraph_t *g, Agedge_t *e, Agnode_t *n)
int matinv(double **A, double **Ainv, int n)
EXTERN unsigned char Verbose
int circuit_model(graph_t *g, int nG)
int solveCircuit(int nG, double **Gm, double **Gm_inv)