INGOR
Loading...
Searching...
No Matches
ytOtoPK.h
1/*
2 math/ytOtoPK.{h,c} : Online Topological Ordering by PK Algorithm
3 Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4 All rights reserved.
5
6 See LICENSE.txt for details of the licensing agreement.
7*/
8
9#ifndef __YTLIB_OTO_PK_H
10#define __YTLIB_OTO_PK_H
11
12#include "ytPCGraph.h"
13
14typedef struct {
15 int id;
16 int ord;
18
19typedef struct {
20 int size;
21 int * ord;
22 int * visited;
23 ytOtoPK_sort_t * Rf;
24 int Rfp;
25 ytOtoPK_sort_t * Rb;
26 int Rbp;
27} ytOtoPK;
28
29ytOtoPK * ytOtoPK_new(int size);
30ytOtoPK * ytOtoPK_newPCGraph(const ytPCGraph * g);
31int ytOtoPK_init(ytOtoPK * this, const ytPCGraph * g);
32void ytOtoPK_delete(void * this);
33void ytOtoPK_copy(const ytOtoPK * this, ytOtoPK * oto);
34int ytOtoPK_addEdge(ytOtoPK * this, int x, int y, ytPCGraph * g);
35int ytOtoPK_checkCyclic(ytOtoPK * this, int x, int y, const ytPCGraph * g);
36int ytOtoPK_checkCyclicReorder(ytOtoPK * this, int x, int y, const ytPCGraph * g);
37void ytOtoPK_setOrder(const ytOtoPK * this, int * ord);
38void ytOtoPK_printOrder(const ytOtoPK * this, FILE * fp);
39
40#endif /* __YTLIB_OTO_PK_H */
Definition ytOtoPK.h:14
Online Topological Ordering by PK Algorithm.
Definition ytOtoPK.h:19
Definition ytPCGraph.h:16