목차
#8 - 깊이순회(무방향 그래프).c 7.17KB
#8 - 너비순회(무방향그래프).c 8.98KB
깊이,너비 순회.jpg 60.2KB
#8 - 너비순회(무방향그래프).c 8.98KB
깊이,너비 순회.jpg 60.2KB
본문내용
#include
#include
#include
typedef struct VertexPosition{ // 정점리스트 내의 정점들의 위치를 저장하기 위한 구조체
struct vertex* v;
struct VertexPosition* next;
}VertexPosition;
typedef struct { // 정점리스트
VertexPosition* first;
VertexPosition* last;
}VertexList;
typedef struct edgePosition{ // 간선리스트 내의 간선들의 위치를 저장하기 위한 구조체
struct edge* e;
struct edgePosition* next;
}EdgePosition;
typedef struct { // 간선리스트
EdgePosition* first;
EdgePosition* last;
}EdgeList;
typedef struct incidentEdge{ // 정점내 귀착간선들의 위치를 저장하기 위한 구조체
struct incidentEdge* next;
struct edge* e;
}IncidentEdge;
typedef struct{ // 정점내 귀착간선 리스트
IncidentEdge* first;
IncidentEdge* last;
}IncidentEdgeList;
typedef struct vertex{ // 정점의 정보들을 저장하기 위한 구조체
char name;
VertexPosition* position;
IncidentEdgeList* i;
char label[10];
#include
#include
typedef struct VertexPosition{ // 정점리스트 내의 정점들의 위치를 저장하기 위한 구조체
struct vertex* v;
struct VertexPosition* next;
}VertexPosition;
typedef struct { // 정점리스트
VertexPosition* first;
VertexPosition* last;
}VertexList;
typedef struct edgePosition{ // 간선리스트 내의 간선들의 위치를 저장하기 위한 구조체
struct edge* e;
struct edgePosition* next;
}EdgePosition;
typedef struct { // 간선리스트
EdgePosition* first;
EdgePosition* last;
}EdgeList;
typedef struct incidentEdge{ // 정점내 귀착간선들의 위치를 저장하기 위한 구조체
struct incidentEdge* next;
struct edge* e;
}IncidentEdge;
typedef struct{ // 정점내 귀착간선 리스트
IncidentEdge* first;
IncidentEdge* last;
}IncidentEdgeList;
typedef struct vertex{ // 정점의 정보들을 저장하기 위한 구조체
char name;
VertexPosition* position;
IncidentEdgeList* i;
char label[10];
소개글