#include "as.h"
#if !defined(lint) && !defined(SABER)
-static char sccsid[] = "@(#)as_init.c 1.4 11/13/90";
+static char sccsid[] = "@(#)as_init.c 1.4 11/13/90";
#endif /* not lint */
/*
struct as_data *
as_init(int maxneighbors,
int hashsize,
- int (*hashfunc) (struct as_coord),
- int (*neighborfunc) (struct as_coord, struct as_coord *, s_char *),
- double (*lbcostfunc) (struct as_coord, struct as_coord, s_char *),
- double (*realcostfunc) (struct as_coord, struct as_coord, s_char *),
- double (*seccostfunc) (struct as_coord, struct as_coord, s_char *),
+ int (*hashfunc) (struct as_coord),
+ int (*neighborfunc) (struct as_coord, struct as_coord *, s_char *),
+ double (*lbcostfunc) (struct as_coord, struct as_coord, s_char *),
+ double (*realcostfunc) (struct as_coord, struct as_coord,
+ s_char *),
+ double (*seccostfunc) (struct as_coord, struct as_coord, s_char *),
s_char *userdata)
{
- struct as_data *adp;
+ struct as_data *adp;
- AS_NEW(adp, struct as_data, NULL);
- AS_NEW_ARRAY(adp->neighbor_coords, struct as_coord,
- maxneighbors, NULL);
- AS_NEW_ARRAY(adp->neighbor_nodes, struct as_node *,
- maxneighbors + 1, NULL);
- AS_NEW_ARRAY(adp->hashtab, struct as_hash *,
- hashsize, NULL);
+ AS_NEW(adp, struct as_data, NULL);
+ AS_NEW_ARRAY(adp->neighbor_coords, struct as_coord,
+ maxneighbors, NULL);
+ AS_NEW_ARRAY(adp->neighbor_nodes, struct as_node *,
+ maxneighbors + 1, NULL);
+ AS_NEW_ARRAY(adp->hashtab, struct as_hash *, hashsize, NULL);
- adp->maxneighbors = maxneighbors;
- adp->hashsize = hashsize;
- adp->hash = hashfunc;
- adp->neighbor = neighborfunc;
- adp->lbcost = lbcostfunc;
- adp->realcost = realcostfunc;
- adp->seccost = seccostfunc;
- adp->userdata = userdata;
+ adp->maxneighbors = maxneighbors;
+ adp->hashsize = hashsize;
+ adp->hash = hashfunc;
+ adp->neighbor = neighborfunc;
+ adp->lbcost = lbcostfunc;
+ adp->realcost = realcostfunc;
+ adp->seccost = seccostfunc;
+ adp->userdata = userdata;
- return (adp);
+ return (adp);
}