Graphs/inc/my_structures.h

62 lines
658 B
C++

#ifndef MY_STRUCTURES
#define MY_STRUCTURES
#include <iostream>
#include <vector>
using namespace std;
using Matrix = vector<vector<int>>;
typedef struct {
size_t to;
int cost;
} Edge;
typedef struct {
vector<Edge> neighbours;
} Vertex;
using Graph = vector<Vertex>;
enum Color {
white,
gray,
black
};
enum eStatus {
absent,
tree,
backward,
forward,
cross
};
typedef struct {
int depth;
Color color;
int previous;
} bfs_vertex;
typedef struct {
int start;
int end;
} Time_t;
typedef struct {
Color color;
int previous;
Time_t time;
} dfs_vertex;
#endif