#ifndef _SMALLGRAPH_TRANSITIVE_H
#define _SMALLGRAPH_TRANSITIVE_H 1

#include "smallgraph.h"

/*
** Same thing except for transitive graphs.  (A transitive graph is one
** in which every node is similar to every other.)
*/
CLIQUE *SmallGraphTransitiveKnFirst(SMALL_GRAPH *G, int n);
CLIQUE *SmallGraphTransitiveInFirst(SMALL_GRAPH *G, int n);
Boolean SmallGraphTransitiveKnContains(SMALL_GRAPH *G, int n);
Boolean SmallGraphTransitiveInContains(SMALL_GRAPH *G, int n);

#if 0
Boolean SmallGraphTransitivesIsomorphic(SMALL_GRAPH *G1, SMALL_GRAPH *G2);
#else
#define SmallGraphTransitivesIsomorphic SmallGraphsIsomorphic
#endif

/*
** Functions to generate all k-circulant graphs on n vertices.
** They are not optimal, in the sense of producing all
** non-isomporphic ones, but (number of graphs produced by these
** functions) / (number of non-isomprphs) should be about O(1+1/k).
** (ie, asymtotically pretty good.)  Pass the same graph pointer
** on and on until GraphNextCirculant returns NULL.
*/

typedef struct _circulant_graph {
    SMALL_GRAPH *G;
    COMBIN *C;
    long long i;
} GRAPH_CIRCULANTS;

GRAPH_CIRCULANTS *SmallGraphCirculantZeroth(int n, int r);
GRAPH_CIRCULANTS *SmallGraphCirculantIth(int n, int r, unsigned long long I);
GRAPH_CIRCULANTS *SmallGraphCirculantNext(GRAPH_CIRCULANTS *currentCirculant);
void SmallGraphCirculantFree(GRAPH_CIRCULANTS *rrg);

/* Algorithms for generating circulants without isomorphs (from Eppstein) */
GRAPH_CIRCULANTS *SmallGraphCirculantUniqueIth(int n, unsigned long I);
GRAPH_CIRCULANTS *SmallGraphCirculantUniqueZeroth(int n);
GRAPH_CIRCULANTS *SmallGraphCirculantUniqueNext(GRAPH_CIRCULANTS *rrg);
void SmallGraphCirculantUniqueFree(GRAPH_CIRCULANTS *rrg);

#endif /* _SMALLGRAPH_TRANSITIVE_H */
