15
10 10 주 주주주주 주 주주주주 XML Visualization(2) XML Visualization(2) 2009. 1 주주 , 주주주주주 주주 주 주주 ( )

10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Embed Size (px)

Citation preview

Page 1: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

10 10 주 실습강의주 실습강의XML Visualization(2)XML Visualization(2)

2009. 1 학기 , 소프트웨어 설계 및 실험 (Ⅰ)

Page 2: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

실습목표

Page 3: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

<book genre=“novel”><title>The Confidence Man</title>

</book>

OutputElementStart=bookAttributeQName=genreAttributeValue=novelElementStart=titleTextValue=The Confidence ManElementEnd=titleElementEnd=book

Page 4: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA ?

Library C++ 클래스 라이브러리로 구현되었음 . 많은 양의 data type(stack, heap, graph,…),

알고리즘 제공 사용하기 편리 빠른 속도 , 안정성 Manual, Reference 제공 상용 ( 학습용으로 free edition 제공 )

Page 5: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA 사용법

Borame.cs.pusan.ac.kr 에서 download 압축해제 프로젝트 생성 프로젝트 속성

- C/C++ -> 일반 -> 추가 포함 디렉토리 <LEDA>\incl 추가

- C/C++ -> 전처리기 ->전처리기 정의 ;LEDA_DLL 추가

- 링커 -> 일반 -> 추가 라이브러리 디렉토리 <LEDA> 추가

- 링커 -> 입력 -> 추가 종속성 libGeoW_mdd_dll.lib Leda_mdd.lib 추가

- 파일 복사 leda_mdd.dll

Page 6: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA

LEDA Test- Main.cpp 추가- Leda demo에 있는거 이것 저것 실행시켜본다 .

http://www.algorithmic-solutions.com/

Page 7: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

#include <leda/graphics/graphwin.h>

using namespace leda;

int main(int argc, char * argv){

GraphWin gw;

gw.display(window::center, window::center);

gw.edit();

return 0;}

Page 8: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

Page 9: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

Graph- node, edge의 집합

GraphWin- 그래프의 생성 , 디스플레이 , 조작 및 에니메이션

- node, edge의 추가 및 디스플레이 설정 가능

http://www.algorithmic-solutions.info/leda_manual/GraphWin.html

Page 10: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

#include <leda/graphics/graphwin.h>

using namespace leda;

int main(int argc, char * argv){

GraphWin gw;

gw.display(window::center, window::center);

gw.edit();

return 0;}

Page 11: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

#include <leda/graphics/graphwin.h>

using namespace leda;

int main(int argc, char * argv){

GraphWin gw;

gw.display(window::center, window::center);

gw.new_node(point(50,50));

gw.edit();

return 0;}

Page 12: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

node n1 = nil;node n2 = nil;

n1 = gw.new_node(point(50,50));n2 = gw.new_node(point(100, 100));

gw.new_edge(n1, n2);

Page 13: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

LEDA graphwin

node n1;list<node> nodeList;

gw.set_node_width(90);

n1 = gw.new_node(point(50,50));gw.set_label(n1, "first node");gw.set_shape(n1, rectangle_node);

nodeList.push_back(n1);

n1 = gw.new_node(point(150,150));gw.set_label(n1, "second node");

gw.new_edge(nodeList.back(), n1);

Page 14: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory

구현방법

startElement event 발생시 해당 element의 이름으로 그래프의 노드 추가

Attributes가 있으면 해당 element에 추가

Page 15: 10 주 실습강의 XML Visualization(2) 2009. 1 학기, 소프트웨어 설계 및 실험 ( Ⅰ )

Artificial Intelligence Laboratory