1 /* Include file of definitions for program oc (o.c). */
3 #define val_A_B(arr,n,i,j) arr[i][j-i-1]
5 /* structure to hold cluster details
6 Note: Normally, parentA and parentB point to pre-existing
7 clusters stored above them in the array of clusters.
9 If the cluster is a single entity, then parentA and parentB
11 If one or more of the parents are single entites, then
12 the storage for the entites is malloc'd independently
13 of the master cluster array.
17 double score; /* score for this cluster */
18 int n; /* number of entitites in this cluster */
19 int *members; /* entities - this is redundant but speeds code */
20 struct sc *parentA; /* one parent of this cluster */
21 struct sc *parentB; /* the other parent */
22 char lab; /* lable set this to 1 normally. 0 if the cluster has been processed */
25 double **read_up_diag(FILE *infile, int n);
26 char **read_idents(FILE *infile, int n);
27 void write_up_diag(FILE *infile, double **ret_val,int n);
28 void show_entity(struct sc *entity,FILE *out);
29 void show_inx_entity(struct sc *entity,int *inx,FILE *out);
30 struct sc *make_entity(int i,double base_val);
31 /* double val_A_B(double **arr,int n,int i,int j);*/
33 double **arr, /* upper diagonal array */
34 int n, /* side of array */
35 int *grpA, /* array containing entities of group */
36 int ng, /* number of members in grpA */
37 int j, /* entity to compare to grpA */
38 int choice /* see above */
41 double **arr, /* upper diagonal array */
42 int n, /* side of array */
43 int *grpA, /* array containing entities of group */
44 int ngA, /* number of members in grpA */
45 int *grpB, /* array containing entities of group B*/
46 int ngB, /* number of members in grpB */
47 int choice /* see above */
49 void remove_unclust(int *unclust,int *nunclust,int val);
50 void iprintarr(int *arr,int n,FILE *out);
57 void add_notparent(int *np,int *n,int A);
58 void remove_notparent(int *np,int *n,int A);
59 void sub_notparent(int *np,int *n,int A,int B);
60 double **GJDudarr(int n);
61 void draw_dendrogram(FILE *fout,
68 double get_mean(int *arr,int *inx,int n);
69 void draw_arch(FILE *fout,
76 double trans_y(double X,
83 double trans_x(double x,
90 void PSPutText(float x,float y,char *text,FILE *outf);
91 void show_id_entity(struct sc *entity,char **id,FILE *out);
93 void mark_parents(struct sc *entity);
94 void write_unclustered(struct sc *entity,char **idents,FILE *fout);
95 void up_diag_log(double **arr,int n);
96 void print_amps_cluster(struct sc *entity,int *inx,FILE *fp);