-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgraph.h
More file actions
65 lines (58 loc) · 1.89 KB
/
graph.h
File metadata and controls
65 lines (58 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*RNAStructProfiling -- Profiles RNA structures and produces a summary graph in graphviz format.
* Copyright 2013, 2014, 2018 Emily Rogers
*
* This file is part of RNAStructProfiling.
*
* RNAStructProfiling is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RNAStructProfiling is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RNAStructProfiling. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef GRAPH_H
#define GRAPH_H
#define SIZE 4
#include "Set.h"
/* Node Struct
typedef struct node
{
char *label;
struct node **neighbors;
int numNeighbors;
int nsize;
int sfreq;
int gfreq;
char *bracket;
char **diff;
int DFS;
unsigned long sum;
} node;
*/
void init_graph(FILE *fp, Set *set);
int initialize(Set *set);
char* rm_root(int j, char* label);
void print_input(FILE *fp,Set *set);
//unsigned long binary_rep(Set *set,char *profile);
void find_LCAs(FILE *fp,Set *set,int i);
int advance(int newk, int oldk);
int not_in_sums(unsigned long num, int k,node **vertices);
char* convert_binary(unsigned long binary);
void found_edge(node *child,node *parent) ;
void calc_gfreq(FILE *fp,Set *set);
void removeEdges(HASHTBL *deleteHash);
void removeEdge(int i, int j);
void make_oval_bracket(node *vert);
char* find_child_bracket(node *vert, node *child);
void print_edges(FILE *fp,Set *set);
void printGraph();
void freeGraph();
extern node** graph;
extern int GRAPHSIZE;
#endif