Go to the documentation of this file.
36 idx_t minedge, maxedge, minewgt, maxewgt;
48 htable =
ismalloc(nvtxs, 0,
"htable");
50 minedge = maxedge =
adjncy[0];
51 minewgt = maxewgt =
adjwgt[0];
53 for (
i=0;
i<nvtxs;
i++) {
57 minedge = (k < minedge) ? k : minedge;
58 maxedge = (k > maxedge) ? k : maxedge;
64 printf(
"Vertex %"PRIDX" contains a self-loop "
65 "(i.e., diagonal entry in the matrix)!\n",
i+
numflag);
75 "do not have the same weight!\n",
95 printf(
"Edge %"PRIDX" from vertex %"PRIDX" is repeated %"PRIDX" times\n",
106 if (err > 0 && verbose) {
107 printf(
"A total of %"PRIDX" errors exist in the input file. "
108 "Correct them, and run again!\n", err);
113 return (err == 0 ? 1 : 0);
126 printf(
"Input Error: ncon must be >= 1.\n");
131 for (
i=
ncon*nvtxs;
i>=0;
i--) {
133 printf(
"Input Error: negative vertex weight(s).\n");
139 for (
i=nvtxs;
i>=0;
i--) {
141 printf(
"Input Error: negative vertex sizes(s).\n");
147 for (
i=
xadj[nvtxs]-1;
i>=0;
i--) {
149 printf(
"Input Error: non-positive edge weight(s).\n");
180 idx_t *nxadj, *nadjncy, *nadjwgt;
185 nvtxs =
graph->nvtxs;
193 ngraph->
nvtxs = nvtxs;
207 for (nedges=0,
i=0;
i<nvtxs;
i++) {
229 for (k=0,
i=1;
i<nedges;
i++) {
237 nxadj = ngraph->
xadj =
ismalloc(nvtxs+1, 0,
"FixGraph: nxadj");
238 nadjncy = ngraph->
adjncy =
imalloc(2*nedges,
"FixGraph: nadjncy");
239 nadjwgt = ngraph->
adjwgt =
imalloc(2*nedges,
"FixGraph: nadjwgt");
243 for (k=0; k<nedges; k++) {
249 for (k=0; k<nedges; k++) {
graph_t * FixGraph(graph_t *graph)
idx_t idx_t idx_t idx_t idx_t * numflag
idx_t idx_t idx_t idx_t idx_t idx_t * adjwgt
void gk_free(void **ptr1,...)
idx_t idx_t idx_t idx_t idx_t * vsize
vector< MFAS::KeyPair > edges
idx_t idx_t idx_t * adjncy
int CheckGraph(graph_t *graph, int numflag, int verbose)
static const Line3 l(Rot3(), 1, 1)
idx_t idx_t idx_t idx_t * vwgt
#define ASSERT(expression)
#define SHIFTCSR(i, n, a)
Array< int, Dynamic, 1 > v
NonlinearFactorGraph graph
void * gk_malloc(size_t nbytes, char *msg)
int CheckInputGraphWeights(idx_t nvtxs, idx_t ncon, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:58