Offset 1, 10 lines modified | Offset 1, 10 lines modified |
1 | <FILENAME·filename="index.html"><html><head><title>The·Rocs·Handbook</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="description"·content="Rocs·is·a·graph·theory·tool·for·KDE."><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="next"·href="introduction.html"·title="Chapter 1. Introduction"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·id="content"><div·id="header"><div·id="header_content"><div·id="header_left"><div·id="header_right"><img·src="help:/common/top-kde.jpg"··✂ | 1 | <FILENAME·filename="index.html"><html><head><title>The·Rocs·Handbook</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="description"·content="Rocs·is·a·graph·theory·tool·for·KDE."><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="next"·href="introduction.html"·title="Chapter 1. Introduction"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div·id="content"><div·id="header"><div·id="header_content"><div·id="header_left"><div·id="header_right"><img·src="help:/common/top-kde.jpg"··✂ |
2 | <span·class="application">Rocs</span>·is·a·graph·theory·tool·for·<acronym·class="acronym">KDE</acronym>. | 2 | <span·class="application">Rocs</span>·is·a·graph·theory·tool·for·<acronym·class="acronym">KDE</acronym>. |
3 | </p></div></div></div></div><hr></div><div·class="toc"><p><b>Table·of·Contents</b></p><dl><dt><span·class="chapter"><a·href="introduction.html">1.·Introduction</a></span></dt><dd><dl><dt><span·class="sect1"><a·href="introduction.html#introduction-goals">Goals,·Target·Audience·and·Workflow</a></span></dt><dt><span·class="sect1"><a·href="introduction-nutshell.html"><span·class="application">Rocs</span>·in·a·Nutshell</a></span></dt><dd><dl><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148716216">Graph·Documents·and·Data·Structure·Backends</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148717752">Data·Structures</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148719288">Pointer·Types</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148720440">Data·Types</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148721592">Dynamic·Properties</a></span></dt></dl></dd><dt><span·class="sect1">·✂ | 3 | </p></div></div></div></div><hr></div><div·class="toc"><p><b>Table·of·Contents</b></p><dl><dt><span·class="chapter"><a·href="introduction.html">1.·Introduction</a></span></dt><dd><dl><dt><span·class="sect1"><a·href="introduction.html#introduction-goals">Goals,·Target·Audience·and·Workflow</a></span></dt><dt><span·class="sect1"><a·href="introduction-nutshell.html"><span·class="application">Rocs</span>·in·a·Nutshell</a></span></dt><dd><dl><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148744888">Graph·Documents·and·Data·Structure·Backends</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148746424">Data·Structures</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148747960">Pointer·Types</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148749112">Data·Types</a></span></dt><dt><span·class="sect2"><a·href="introduction-nutshell.html#idp148750264">Dynamic·Properties</a></span></dt></dl></dd><dt><span·class="sect1">·✂ |
4 | In·this·chapter·we·provide·an·overview·of·the·core·features·and·the·workflow·of·<span·class="application">Rocs</span>. | 4 | In·this·chapter·we·provide·an·overview·of·the·core·features·and·the·workflow·of·<span·class="application">Rocs</span>. |
5 | For·the·eager·reader,·who·wants·to·start·using·<span·class="application">Rocs</span>·immediately,·we·suggest·to·read·at·least·<a·class="xref"·href="introduction-nutshell.html"·title="Rocs·in·a·Nutshell">the·section·called·“<span·class="application">Rocs</span>·in·a·Nutshell”</a>·and·using·<a·class="xref"·href="scripting.html"·title="Chapter 3. Writing·and·Executing·Algorithms·in·Rocs">Chapter 3,·<i>Writing·and·Executing·Algorithms·in·<span·class="application">Rocs</span></i></a>·as·a·reference·when·writing·algorithms. | 5 | For·the·eager·reader,·who·wants·to·start·using·<span·class="application">Rocs</span>·immediately,·we·suggest·to·read·at·least·<a·class="xref"·href="introduction-nutshell.html"·title="Rocs·in·a·Nutshell">the·section·called·“<span·class="application">Rocs</span>·in·a·Nutshell”</a>·and·using·<a·class="xref"·href="scripting.html"·title="Chapter 3. Writing·and·Executing·Algorithms·in·Rocs">Chapter 3,·<i>Writing·and·Executing·Algorithms·in·<span·class="application">Rocs</span></i></a>·as·a·reference·when·writing·algorithms. |
6 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="introduction-goals"></a>Goals,·Target·Audience·and·Workflow</h2></div></div></div><p><span·class="application">Rocs</span>·is·a·Graph·Theory·IDE·for·everybody·interested·in·designing·and·analyzing·graph·algorithms.·This·explicitly·includes</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>lecturers,·who·want·to·demonstrate·algorithms·to·their·students,</p></li><li·class="listitem"><p>students,·who·want·to·understand·and·see·how·their·algorithm·perform,</p></li><li·class="listitem"><p>and·everybody,·who·is·interested·in·data·structures·and·algorithms.</p></li></ul></div><p>For·all·these·users,·<span·class="application">Rocs</span>·provides·an·easy·to·use·data·structure·editor·for·creating·the·data·structures,·a·powerful·scripting·engine·to·execute·algorithms,·and·several·helper·tools·for·your·simulations·and·experiments. | 6 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="introduction-goals"></a>Goals,·Target·Audience·and·Workflow</h2></div></div></div><p><span·class="application">Rocs</span>·is·a·Graph·Theory·IDE·for·everybody·interested·in·designing·and·analyzing·graph·algorithms.·This·explicitly·includes</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>lecturers,·who·want·to·demonstrate·algorithms·to·their·students,</p></li><li·class="listitem"><p>students,·who·want·to·understand·and·see·how·their·algorithm·perform,</p></li><li·class="listitem"><p>and·everybody,·who·is·interested·in·data·structures·and·algorithms.</p></li></ul></div><p>For·all·these·users,·<span·class="application">Rocs</span>·provides·an·easy·to·use·data·structure·editor·for·creating·the·data·structures,·a·powerful·scripting·engine·to·execute·algorithms,·and·several·helper·tools·for·your·simulations·and·experiments. |
7 | </p><p> | 7 | </p><p> |
8 | The·typical·workflow·when·using·<span·class="application">Rocs</span>·is·to·start·by·creating·a·graph·with·the·visual·graph·editor. | 8 | The·typical·workflow·when·using·<span·class="application">Rocs</span>·is·to·start·by·creating·a·graph·with·the·visual·graph·editor. |
9 | You·can·do·this·either·by·hand,·this·is·adding·data·elements·and·connect·them,·or·by·using·one·of·the·data·structure·generators·(if·available·for·the·currently·selected·data·structure·backend). | 9 | You·can·do·this·either·by·hand,·this·is·adding·data·elements·and·connect·them,·or·by·using·one·of·the·data·structure·generators·(if·available·for·the·currently·selected·data·structure·backend). |
10 | Data·structure·generators·can·be·found·at·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Tools</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Generate·Graph</span></span>. | 10 | Data·structure·generators·can·be·found·at·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Tools</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Generate·Graph</span></span>. |
Offset 14, 31 lines modified | Offset 14, 31 lines modified |
14 | </p><div·class="screenshot"><div·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="mediaobject"><hr><img·src="rocs-screenshot.png"·alt="A·Screenshot·of·Rocs."><hr></div></div></div><FILENAME·filename="introduction-nutshell.html"><html><head><title>Rocs·in·a·Nutshell</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="introduction.html"·title="Chapter 1. Introduction"><link·rel="prev"·href="introduction.html"·title="Chapter 1. Introduction"><link·rel="next"·href="introduction-tutorial.html"·title="Tutorial"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·cont·✂ | 14 | </p><div·class="screenshot"><div·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="mediaobject"><hr><img·src="rocs-screenshot.png"·alt="A·Screenshot·of·Rocs."><hr></div></div></div><FILENAME·filename="introduction-nutshell.html"><html><head><title>Rocs·in·a·Nutshell</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="introduction.html"·title="Chapter 1. Introduction"><link·rel="prev"·href="introduction.html"·title="Chapter 1. Introduction"><link·rel="next"·href="introduction-tutorial.html"·title="Tutorial"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·cont·✂ |
15 | In·this·section·we·provide·a·compact·overview·of·the·core·elements·of·<span·class="application">Rocs</span>. | 15 | In·this·section·we·provide·a·compact·overview·of·the·core·elements·of·<span·class="application">Rocs</span>. |
16 | We·explain·the·important·notions·of·data·structures,·data·structure·backends,·and·element·types. | 16 | We·explain·the·important·notions·of·data·structures,·data·structure·backends,·and·element·types. |
17 | Understanding·of·these·concepts·is·useful·to·understand·how·data·structures·can·be·created·and·modified·in·<span·class="application">Rocs</span>. | 17 | Understanding·of·these·concepts·is·useful·to·understand·how·data·structures·can·be·created·and·modified·in·<span·class="application">Rocs</span>. |
18 | </p><p> | 18 | </p><p> |
19 | In·general·<span·class="application">Rocs</span>·works·with·projects:·when·opening·<span·class="application">Rocs</span>·an·empty·project·is·created·and·you·can·replace·it·by·loading·or·importing·another·project. | 19 | In·general·<span·class="application">Rocs</span>·works·with·projects:·when·opening·<span·class="application">Rocs</span>·an·empty·project·is·created·and·you·can·replace·it·by·loading·or·importing·another·project. |
20 | Hereby,·a·project·itself·consists·of·<span·class="emphasis"><em>graph·documents</em></span>·and·<span·class="emphasis"><em>scripts</em></span>. | 20 | Hereby,·a·project·itself·consists·of·<span·class="emphasis"><em>graph·documents</em></span>·and·<span·class="emphasis"><em>scripts</em></span>. |
21 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148716216"></a>Graph·Documents·and·Data·Structure·Backends</h3></div></div></div><p> | 21 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148744888"></a>Graph·Documents·and·Data·Structure·Backends</h3></div></div></div><p> |
22 | A·graph·document·represents·the·content·of·a·whiteboard·in·the·visual·graph·editor. | 22 | A·graph·document·represents·the·content·of·a·whiteboard·in·the·visual·graph·editor. |
23 | Hereby,·a·graph·document·can·contain·several·data·structures·at·once,·but·only·one·data·structure·backends. | 23 | Hereby,·a·graph·document·can·contain·several·data·structures·at·once,·but·only·one·data·structure·backends. |
24 | Data·structure·backends·are·present·for·several·graph·types·(general·graphs,·linked·lists,·rooted·trees)·and·provide·for·their·specific·graph·types·additional·functionality.·That·can·be·automatic·positioning·of·the·elements,·special·icon·sets,·or·an·extended·set·of·script·functions·for·use·in·your·algorithms.·(for·details·look·at·the·corresponding·handbook·section).·It·is·possible·to·change·the·data·structure·backend·of·a·graph·document,·though·information·can·be·lost·(e.g.,·edges·of·a·circle·in·a·general·graph·won't·be·added·to·a·tree,·if·you·switch·to·the·rooted·tree·backend). | 24 | Data·structure·backends·are·present·for·several·graph·types·(general·graphs,·linked·lists,·rooted·trees)·and·provide·for·their·specific·graph·types·additional·functionality.·That·can·be·automatic·positioning·of·the·elements,·special·icon·sets,·or·an·extended·set·of·script·functions·for·use·in·your·algorithms.·(for·details·look·at·the·corresponding·handbook·section).·It·is·possible·to·change·the·data·structure·backend·of·a·graph·document,·though·information·can·be·lost·(e.g.,·edges·of·a·circle·in·a·general·graph·won't·be·added·to·a·tree,·if·you·switch·to·the·rooted·tree·backend). |
25 | </p><p> | 25 | </p><p> |
26 | Graph·documents·form·also·the·base·for·defining·pointer·types·and·data·types. | 26 | Graph·documents·form·also·the·base·for·defining·pointer·types·and·data·types. |
27 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148717752"></a>Data·Structures</h3></div></div></div><p> | 27 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148746424"></a>Data·Structures</h3></div></div></div><p> |
28 | Data·structures·are·the·base·of·all·work·in·<span·class="application">Rocs</span>.·You·can·add·one·or·several·of·them·to·a·graph·document,·add·data·elements·(nodes,·datums)·and·pointers·to·them,·and·modify·them·by·scripts.·For·this,·each·data·structure·has·its·unique·name·by·which·it·can·be·accessed·from·your·scripts.·Due·to·your·choice·of·the·current·data·structure·backend·it·can·happen·that·you·cannot·modify·the·data·structures·arbitrarily·(e.g.,·a·tree·should·never·contain·a·cycle).·The·data·structure·backend·is·determined·by·the·data·structure·backend·associated·with·the·corresponding·graph·document·that·contains·the·data·structure. | 28 | Data·structures·are·the·base·of·all·work·in·<span·class="application">Rocs</span>.·You·can·add·one·or·several·of·them·to·a·graph·document,·add·data·elements·(nodes,·datums)·and·pointers·to·them,·and·modify·them·by·scripts.·For·this,·each·data·structure·has·its·unique·name·by·which·it·can·be·accessed·from·your·scripts.·Due·to·your·choice·of·the·current·data·structure·backend·it·can·happen·that·you·cannot·modify·the·data·structures·arbitrarily·(e.g.,·a·tree·should·never·contain·a·cycle).·The·data·structure·backend·is·determined·by·the·data·structure·backend·associated·with·the·corresponding·graph·document·that·contains·the·data·structure. |
29 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148719288"></a>Pointer·Types</h3></div></div></div><p> | 29 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148747960"></a>Pointer·Types</h3></div></div></div><p> |
30 | By·pointer·types·you·can·define·different·types·of·pointers·to·be·used·in·your·data·structures. | 30 | By·pointer·types·you·can·define·different·types·of·pointers·to·be·used·in·your·data·structures. |
31 | This·is,·a·pointer·type·can·get·an·individual·layout·(essentially·a·color)·and·it·is·easy·to·access·only·pointers·of·a·specific·type·from·your·scripts. | 31 | This·is,·a·pointer·type·can·get·an·individual·layout·(essentially·a·color)·and·it·is·easy·to·access·only·pointers·of·a·specific·type·from·your·scripts. |
32 | Typical·use·cases·for·pointers·can·be·to·implement·meta-edges·at·your·data·structures·that·visualize·relationships·between·data·elements·(e.g.,·visualize·communication·interests).·But·also,·if·your·scripts·shall·identify·specific·kinds·of·edges·(e.g.,·tree·and·cross·edges·at·the·depth·first·search·algorithm),·pointer·types·can·be·an·elegant·way·to·implement·that. | 32 | Typical·use·cases·for·pointers·can·be·to·implement·meta-edges·at·your·data·structures·that·visualize·relationships·between·data·elements·(e.g.,·visualize·communication·interests).·But·also,·if·your·scripts·shall·identify·specific·kinds·of·edges·(e.g.,·tree·and·cross·edges·at·the·depth·first·search·algorithm),·pointer·types·can·be·an·elegant·way·to·implement·that. |
33 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148720440"></a>Data·Types</h3></div></div></div><p> | 33 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148749112"></a>Data·Types</h3></div></div></div><p> |
34 | In·several·data·structure·problems,·a·set·of·data·elements·should·be·parted·into·groups·of·different·types·(e.g.,·clustering·problems·or·covering·problems). | 34 | In·several·data·structure·problems,·a·set·of·data·elements·should·be·parted·into·groups·of·different·types·(e.g.,·clustering·problems·or·covering·problems). |
35 | Or·it·is·useful·for·the·execution·of·an·algorithm·to·specify·a·data·element·type·to·express·a·specific·type·(e.g.,·breath·first·search). | 35 | Or·it·is·useful·for·the·execution·of·an·algorithm·to·specify·a·data·element·type·to·express·a·specific·type·(e.g.,·breath·first·search). |
36 | For·such·use·cases·you·can·define·data·types.·Each·data·type·has·its·own·icon·and·data·types·of·some·type·can·easily·be·accessed·from·your·scripts. | 36 | For·such·use·cases·you·can·define·data·types.·Each·data·type·has·its·own·icon·and·data·types·of·some·type·can·easily·be·accessed·from·your·scripts. |
37 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148721592"></a>Dynamic·Properties</h3></div></div></div><p> | 37 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148750264"></a>Dynamic·Properties</h3></div></div></div><p> |
38 | Every·data·element·and·pointer·can·have·many·properties.·Some·of·these·properties·are·default·from·data·structure·backend.·See·the·documentation·of·the·data·structure·backend·for·more·details. | 38 | Every·data·element·and·pointer·can·have·many·properties.·Some·of·these·properties·are·default·from·data·structure·backend.·See·the·documentation·of·the·data·structure·backend·for·more·details. |
39 | To·add·further·properties·to·the·data·elements·and·pointers,·you·can·add·<span·class="emphasis"><em>dynamic·properties</em></span>·to·them. | 39 | To·add·further·properties·to·the·data·elements·and·pointers,·you·can·add·<span·class="emphasis"><em>dynamic·properties</em></span>·to·them. |
40 | Each·dynamic·property·is·identified·by·its·name·and·can·contain·any·value·associated·with·it.·The·name·must·start·with·a·letter·(a-z·or·A-Z)·and·can·contain·only·letters,·numbers·and·'_'.·If·you·try·to·use·any·invalid·character·in·the·property·name,·the·property·will·not·be·changed. | 40 | Each·dynamic·property·is·identified·by·its·name·and·can·contain·any·value·associated·with·it.·The·name·must·start·with·a·letter·(a-z·or·A-Z)·and·can·contain·only·letters,·numbers·and·'_'.·If·you·try·to·use·any·invalid·character·in·the·property·name,·the·property·will·not·be·changed. |
41 | </p><p> | 41 | </p><p> |
42 | To·add·dynamic·properties,·use·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Data·Element·Properties</span></span>·and·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Pointer·Properties</span></span>·dialogs·from·the·context·menus·of·the·respective·elements·or·the·script·functions·as·explained·in·<a·class="xref"·href="scripting-API.html#scripting-data-structure"·title="Scripting·API·for·every·Data·Structure">the·section·called·“Scripting·API·for·every·Data·Structure”</a>. | 42 | To·add·dynamic·properties,·use·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Data·Element·Properties</span></span>·and·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Pointer·Properties</span></span>·dialogs·from·the·context·menus·of·the·respective·elements·or·the·script·functions·as·explained·in·<a·class="xref"·href="scripting-API.html#scripting-data-structure"·title="Scripting·API·for·every·Data·Structure">the·section·called·“Scripting·API·for·every·Data·Structure”</a>. |
43 | </p><p> | 43 | </p><p> |
44 | You·can·also·use·the·scripts.·You·just·need·to·use·the·<code·class="literal">add_property</code>·with·the·name·and·value·of·your·property. | 44 | You·can·also·use·the·scripts.·You·just·need·to·use·the·<code·class="literal">add_property</code>·with·the·name·and·value·of·your·property. |
Offset 57, 25 lines modified | Offset 57, 25 lines modified |
57 | In·this·section·we·want·to·create·an·example·project·to·explore·some·of·the·most·important·functions·of·<span·class="application">Rocs</span>. | 57 | In·this·section·we·want·to·create·an·example·project·to·explore·some·of·the·most·important·functions·of·<span·class="application">Rocs</span>. |
58 | The·goal·is·to·create·a·graph·and·a·script·that·illustrates·a·simple·2-approximate·algorithm·for·the·<span·class="emphasis"><em>minimum·vertex·cover</em></span>·problem. | 58 | The·goal·is·to·create·a·graph·and·a·script·that·illustrates·a·simple·2-approximate·algorithm·for·the·<span·class="emphasis"><em>minimum·vertex·cover</em></span>·problem. |
59 | The·minimum·vertex·cover·problem·is·the·problem·to·find·a·subset·of·graph·nodes·C·of·minimal·size·such·that·each·graph·edge·is·connected·to·at·least·one·node·in·C. | 59 | The·minimum·vertex·cover·problem·is·the·problem·to·find·a·subset·of·graph·nodes·C·of·minimal·size·such·that·each·graph·edge·is·connected·to·at·least·one·node·in·C. |
60 | This·problem·is·known·to·be·NP-hard·and·we·want·to·illustrate·how·to·find·an·approximation·of·factor·2·by·finding·a·matching·in·the·given·graph·(in·the·following·we·use·the·common·terms·for·graph·algorithms:·graph·is·the·data·structure,·nodes·are·the·data·elements,·edges·are·the·pointers). | 60 | This·problem·is·known·to·be·NP-hard·and·we·want·to·illustrate·how·to·find·an·approximation·of·factor·2·by·finding·a·matching·in·the·given·graph·(in·the·following·we·use·the·common·terms·for·graph·algorithms:·graph·is·the·data·structure,·nodes·are·the·data·elements,·edges·are·the·pointers). |
61 | </p><p> | 61 | </p><p> |
62 | Our·goal·is·to·visualize·the·correspondence·of·the·matching·and·the·minimum·vertex·cover. | 62 | Our·goal·is·to·visualize·the·correspondence·of·the·matching·and·the·minimum·vertex·cover. |
63 | For·this,·we·want·to·specify·two·pointer·types,·one·to·display·matching·edges·and·one·type·to·display·ordinary·edges,·as·well·as·two·data·types·that·we·use·to·distinguish·nodes·contained·in·C·and·those·not·contained·in·C. | 63 | For·this,·we·want·to·specify·two·pointer·types,·one·to·display·matching·edges·and·one·type·to·display·ordinary·edges,·as·well·as·two·data·types·that·we·use·to·distinguish·nodes·contained·in·C·and·those·not·contained·in·C. |
64 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148728760"></a>Generate·a·Graph</h3></div></div></div><p> | 64 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148757432"></a>Generate·a·Graph</h3></div></div></div><p> |
65 | For·the·data·structure·backend·<span·class="quote">“<span·class="quote">Graph</span>”</span>,·<span·class="application">Rocs</span>·ships·a·helper·tool·that·can·generate·graphs.·We·go·to·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guisubmenu">Tools</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Generate·Graph</span></span>. | 65 | For·the·data·structure·backend·<span·class="quote">“<span·class="quote">Graph</span>”</span>,·<span·class="application">Rocs</span>·ships·a·helper·tool·that·can·generate·graphs.·We·go·to·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guisubmenu">Tools</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Generate·Graph</span></span>. |
66 | There·we·generate·a·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Random·Graph</span></span>·with·30·nodes,·90·edges,·and·with·seed·1·(the·seed·is·the·starting·seed·for·the·random·graph·generator;·using·the·same·seed·multiple·times·results·in·same·and·reproducible·graphs). | 66 | There·we·generate·a·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Random·Graph</span></span>·with·30·nodes,·90·edges,·and·with·seed·1·(the·seed·is·the·starting·seed·for·the·random·graph·generator;·using·the·same·seed·multiple·times·results·in·same·and·reproducible·graphs). |
67 | Finally,·we·modify·the·graph·name·at·the·data·structure·panel·and·call·the·graph·<code·class="literal">testgraph</code>. | 67 | Finally,·we·modify·the·graph·name·at·the·data·structure·panel·and·call·the·graph·<code·class="literal">testgraph</code>. |
68 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148736824"></a>Create·Types</h3></div></div></div><p> | 68 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148761400"></a>Create·Types</h3></div></div></div><p> |
69 | We·use·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guibutton">Properties</span></span>·buttons·at·the·Document·Selector·bar·to·open·the·properties·dialog·for·data·and·pointer·types·of·the·current·graph·document. | 69 | We·use·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guibutton">Properties</span></span>·buttons·at·the·Document·Selector·bar·to·open·the·properties·dialog·for·data·and·pointer·types·of·the·current·graph·document. |
70 | For·the·data·types·we·add·a·new·type·called·"C",·which·automatically·gets·ID·<code·class="literal">1</code>. | 70 | For·the·data·types·we·add·a·new·type·called·"C",·which·automatically·gets·ID·<code·class="literal">1</code>. |
71 | For·this·type·we·select·the·server·picture·as·icon. | 71 | For·this·type·we·select·the·server·picture·as·icon. |
72 | Furthermore,·we·switch·to·the·pointer·type·page·and·add·a·new·pointer·type·called·"matching". | 72 | Furthermore,·we·switch·to·the·pointer·type·page·and·add·a·new·pointer·type·called·"matching". |
73 | This·gets·automatically·ID·<code·class="literal">1</code>·and·we·set·the·color·to·blue. | 73 | This·gets·automatically·ID·<code·class="literal">1</code>·and·we·set·the·color·to·blue. |
74 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148739128"></a>The·Algorithm</h3></div></div></div><p> | 74 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148763704"></a>The·Algorithm</h3></div></div></div><p> |
75 | At·last·we·have·to·implement·the·approximation·algorithm.·For·this·we·use·the·following·implementation: | 75 | At·last·we·have·to·implement·the·approximation·algorithm.·For·this·we·use·the·following·implementation: |
76 | </p><pre·class="programlisting"> | 76 | </p><pre·class="programlisting"> |
77 | var·E·=·testgraph.list_edges();·//·set·of·unprocessed·edges | 77 | var·E·=·testgraph.list_edges();·//·set·of·unprocessed·edges |
78 | var·C·=·new·Array();············//·matching·edges | 78 | var·C·=·new·Array();············//·matching·edges |
79 | while·(E.length·>·0)·{ | 79 | while·(E.length·>·0)·{ |
80 | ····var·e·=·E[0];········//·we·take·first·edge·e={u,v} | 80 | ····var·e·=·E[0];········//·we·take·first·edge·e={u,v} |
81 | ····var·u·=·e.start(); | 81 | ····var·u·=·e.start(); |
Offset 102, 15 lines modified | Offset 102, 15 lines modified |
102 | ········var·index·=·E.indexOf(adjacent[i]);·//·find·the·index | 102 | ········var·index·=·E.indexOf(adjacent[i]);·//·find·the·index |
103 | ········if·(index!=-1)·{ | 103 | ········if·(index!=-1)·{ |
104 | ············E.splice(index,·1);·//·remove·it·if·really·found | 104 | ············E.splice(index,·1);·//·remove·it·if·really·found |
105 | ········} | 105 | ········} |
106 | ····} | 106 | ····} |
107 | } | 107 | } |
108 | Console.log("Vertex·Cover·contains·"·+·C.length·+·"·nodes."); | 108 | Console.log("Vertex·Cover·contains·"·+·C.length·+·"·nodes."); |
109 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148740664"></a>Execute·the·Algorithm</h3></div></div></div><p> | 109 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148765240"></a>Execute·the·Algorithm</h3></div></div></div><p> |
110 | Finally·we·want·to·execute·the·algorithm.·For·this·we·can·start·the·execution·by·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guibutton">Run</span></span>·button·at·the·script·control·panel. | 110 | Finally·we·want·to·execute·the·algorithm.·For·this·we·can·start·the·execution·by·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guibutton">Run</span></span>·button·at·the·script·control·panel. |
111 | </p></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="introduction-nutshell.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="user-interface.html">Next</a></td></tr><tr><td·class="prevCell"><span·class="application">Rocs</span>·in·a·Nutshell </td><td·class="upCell">Introduction</td><td·class="nextCell"> The·<span·class="application">Rocs</span>·User·Interface</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="index.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="n·✂ | 111 | </p></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="introduction-nutshell.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="user-interface.html">Next</a></td></tr><tr><td·class="prevCell"><span·class="application">Rocs</span>·in·a·Nutshell </td><td·class="upCell">Introduction</td><td·class="nextCell"> The·<span·class="application">Rocs</span>·User·Interface</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="index.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="n·✂ |
112 | The·user·interface·is·divided·into·several·logical·parts·as·presented·at·the·screenshot·below. | 112 | The·user·interface·is·divided·into·several·logical·parts·as·presented·at·the·screenshot·below. |
113 | </p><div·class="screenshot"><div·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="mediaobject"><hr><img·src="rocs-interfaces.png"·alt="GUI·elements·of·the·Rocs·interface."><hr></div></div><div·class="variablelist"><dl><dt><span·class="term">Document·Selector</span></dt><dd><p>At·this·top·menubar·you·must·select·the·current·document·and·data·structure. | 113 | </p><div·class="screenshot"><div·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="mediaobject"><hr><img·src="rocs-interfaces.png"·alt="GUI·elements·of·the·Rocs·interface."><hr></div></div><div·class="variablelist"><dl><dt><span·class="term">Document·Selector</span></dt><dd><p>At·this·top·menubar·you·must·select·the·current·document·and·data·structure. |
114 | ········Creating·and·deleting·of·data·structures·as·well·as·access·to·data·structure·properties·is·also·possible·there. | 114 | ········Creating·and·deleting·of·data·structures·as·well·as·access·to·data·structure·properties·is·also·possible·there. |
115 | ····</p></dd><dt><span·class="term">Visual·Graph·Editor</span></dt><dd><p>This·is·the·whiteboard·at·which·data·structures·can·be·created·and·modified.·Right·click·at·the·whiteboard,·at·data·elements,·or·at·pointers·to·open·context·menus.·You·can·use·the·tools·from·the·<span·class="emphasis"><em>Visual·Graph·Editor·Toolbar</em></span>·to·modify·the·elements·at·the·visual·graph·editor·whiteboard.</p></dd><dt><span·class="term">Visual·Graph·Editor·Toolbar</span></dt><dd><p> | 115 | ····</p></dd><dt><span·class="term">Visual·Graph·Editor</span></dt><dd><p>This·is·the·whiteboard·at·which·data·structures·can·be·created·and·modified.·Right·click·at·the·whiteboard,·at·data·elements,·or·at·pointers·to·open·context·menus.·You·can·use·the·tools·from·the·<span·class="emphasis"><em>Visual·Graph·Editor·Toolbar</em></span>·to·modify·the·elements·at·the·visual·graph·editor·whiteboard.</p></dd><dt><span·class="term">Visual·Graph·Editor·Toolbar</span></dt><dd><p> |
116 | ········This·toolbar·provides·all·tools·for·the·visual·graph·editor. | 116 | ········This·toolbar·provides·all·tools·for·the·visual·graph·editor. |
Offset 195, 15 lines modified | Offset 195, 15 lines modified |
195 | How·JavaScript·works·and·how·to·write·JavaScript·code·is·not·covered·in·this·handbook,·though·we·explain·how·to·access·data·structures,·data·elements·and·pointers·of·your·data·structures·from·the·scripting·engine. | 195 | How·JavaScript·works·and·how·to·write·JavaScript·code·is·not·covered·in·this·handbook,·though·we·explain·how·to·access·data·structures,·data·elements·and·pointers·of·your·data·structures·from·the·scripting·engine. |
196 | Since·you·never·use·the·basic·data·structure·object·but·one·that·is·provided·by·the·currently·used·data·structure·backend,·the·functionality·of·the·data·structure·is·extended·by·the·corresponding·backend·and·you·should·have·a·look·at·the·specialized·functionality. | 196 | Since·you·never·use·the·basic·data·structure·object·but·one·that·is·provided·by·the·currently·used·data·structure·backend,·the·functionality·of·the·data·structure·is·extended·by·the·corresponding·backend·and·you·should·have·a·look·at·the·specialized·functionality. |
197 | Especially,·data·structure·backends·use·the·common·terms·from·their·domain·(nodes·and·edges·in·graphs,·leafs·and·roots·in·trees,·etc.) | 197 | Especially,·data·structure·backends·use·the·common·terms·from·their·domain·(nodes·and·edges·in·graphs,·leafs·and·roots·in·trees,·etc.) |
198 | </p><p> | 198 | </p><p> |
199 | It·is·important·to·know·that·changes·done·by·the·scripting·engine·are·directly·reflected·at·the·properties·at·the·visual·graph·editor·whiteboard. | 199 | It·is·important·to·know·that·changes·done·by·the·scripting·engine·are·directly·reflected·at·the·properties·at·the·visual·graph·editor·whiteboard. |
200 | Hence,·the·scripts·actually·modify·the·data·structures. | 200 | Hence,·the·scripts·actually·modify·the·data·structures. |
201 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="scripting-controls"></a>Controlling·the·Script·Execution</h2></div></div></div><p> | 201 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="scripting-controls"></a>Controlling·the·Script·Execution</h2></div></div></div><p> |
202 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148852792"></a>Include·Files</h3></div></div></div><p> | 202 | </p><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148873272"></a>Include·Files</h3></div></div></div><p> |
203 | ····Your·script·documents·can·include·other·scripts. | 203 | ····Your·script·documents·can·include·other·scripts. |
204 | ····This·can·be·useful·to·reduce·the·size·of·script·documents·and·improve·readability. | 204 | ····This·can·be·useful·to·reduce·the·size·of·script·documents·and·improve·readability. |
205 | ····Using·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Script·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Possible·Includes</span></span>·you·get·a·list·of·script·files·already·shipped·with·<span·class="application">Rocs</span>·that·could·be·included. | 205 | ····Using·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Script·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Possible·Includes</span></span>·you·get·a·list·of·script·files·already·shipped·with·<span·class="application">Rocs</span>·that·could·be·included. |
206 | ····You·can·include·a·script·file·with·the·following·command: | 206 | ····You·can·include·a·script·file·with·the·following·command: |
207 | </p><pre·class="programlisting"> | 207 | </p><pre·class="programlisting"> |
208 | ····include_script(string·path);············//·relative·or·absolute·path·to·script·file | 208 | ····include_script(string·path);············//·relative·or·absolute·path·to·script·file |
209 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="scripting-output"></a>Script·Output</h3></div></div></div><p> | 209 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="scripting-output"></a>Script·Output</h3></div></div></div><p> |
Offset 228, 111 lines modified | Offset 228, 111 lines modified |
228 | ····</pre></li><li·class="listitem"><p> | 228 | ····</pre></li><li·class="listitem"><p> |
229 | ········<span·class="inlinemediaobject"><img·src="rocs-control-engine-debug.png"></span> | 229 | ········<span·class="inlinemediaobject"><img·src="rocs-control-engine-debug.png"></span> |
230 | ········<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Debug</span></span>:·Execute·script·in·debug·mode.·This·opens·the·QtScript·debug·dialog.</p></li><li·class="listitem"><p> | 230 | ········<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Debug</span></span>:·Execute·script·in·debug·mode.·This·opens·the·QtScript·debug·dialog.</p></li><li·class="listitem"><p> |
231 | ········<span·class="inlinemediaobject"><img·src="rocs-control-engine-stop.png"></span> | 231 | ········<span·class="inlinemediaobject"><img·src="rocs-control-engine-stop.png"></span> |
232 | ········<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Stop</span></span>:·Stop·script·execution·(only·available·if·a·script·is·executing).</p></li></ul></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="user-interface-documents.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="scripting-API.html">Next</a></td></tr><tr><td·class="prevCell">Working·with·Graph·Documents </td><td·class="upCell"> </td><td·class="nextCell"> Scripting·Engine·API</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="scripting-API.html"><html><head><title>Chapter 4. Scripting·Engine·API<·✂ | 232 | ········<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Stop</span></span>:·Stop·script·execution·(only·available·if·a·script·is·executing).</p></li></ul></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="user-interface-documents.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="scripting-API.html">Next</a></td></tr><tr><td·class="prevCell">Working·with·Graph·Documents </td><td·class="upCell"> </td><td·class="nextCell"> Scripting·Engine·API</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="scripting-API.html"><html><head><title>Chapter 4. Scripting·Engine·API<·✂ |
233 | Every·backend·provides·a·special·set·of·functions·and·properties·for·its·data·structures·and·their·elements. | 233 | Every·backend·provides·a·special·set·of·functions·and·properties·for·its·data·structures·and·their·elements. |
234 | But·also·every·backend·provides·the·properties·and·functions·that·are·defined·for·the·base·data·structure. | 234 | But·also·every·backend·provides·the·properties·and·functions·that·are·defined·for·the·base·data·structure. |
235 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="scripting-data-structure"></a>Scripting·API·for·every·Data·Structure</h2></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148870968"></a>Abstract·Data·Structure·Object</h3></div></div></div><p> | 235 | </p><div·class="sect1"><div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"><a·name="scripting-data-structure"></a>Scripting·API·for·every·Data·Structure</h2></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148895544"></a>Abstract·Data·Structure·Object</h3></div></div></div><p> |
236 | The·abstract·data·structure·defines·a·set·of·data·elements·and·possible·connections·between·them,·this·is·the·prototype·for·every·other·data·structure. | 236 | The·abstract·data·structure·defines·a·set·of·data·elements·and·possible·connections·between·them,·this·is·the·prototype·for·every·other·data·structure. |
237 | Data·structures·are·identified·by·their·names. | 237 | Data·structures·are·identified·by·their·names. |
238 | Assuming·you·created·a·data·structure·with·name·<code·class="literal">testgraph</code>,·then·you·can·access·the·data·structure·simply·by·writing·this·identifier. | 238 | Assuming·you·created·a·data·structure·with·name·<code·class="literal">testgraph</code>,·then·you·can·access·the·data·structure·simply·by·writing·this·identifier. |
239 | For·example,·to·get·an·array·with·all·data·elements·in·the·given·data·structure,·you·can·write·<code·class="literal">testgraph.list_nodes();</code>·in·the·script. | 239 | For·example,·to·get·an·array·with·all·data·elements·in·the·given·data·structure,·you·can·write·<code·class="literal">testgraph.list_nodes();</code>·in·the·script. |
240 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148872760"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 240 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148897336"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
241 | ········<span·class="emphasis"><em>name</em></span>·: | 241 | ········<span·class="emphasis"><em>name</em></span>·: |
242 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148875576"></a>Abstract·Data</h3></div></div></div><p> | 242 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148900152"></a>Abstract·Data</h3></div></div></div><p> |
243 | An·abstract·data·element·is·a·unit·of·information·that·belongs·to·an·abstract·data·structure·and·possibly·is·connected·to·other·data·elements·by·pointers. | 243 | An·abstract·data·element·is·a·unit·of·information·that·belongs·to·an·abstract·data·structure·and·possibly·is·connected·to·other·data·elements·by·pointers. |
244 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148876600"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 244 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148905272"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
245 | ········<span·class="emphasis"><em>width</em></span>·: | 245 | ········<span·class="emphasis"><em>width</em></span>·: |
246 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> | 246 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> |
247 | ········<span·class="emphasis"><em>x</em></span>·: | 247 | ········<span·class="emphasis"><em>x</em></span>·: |
248 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 248 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
249 | ········<span·class="emphasis"><em>y</em></span>·: | 249 | ········<span·class="emphasis"><em>y</em></span>·: |
250 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 250 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
251 | ········<span·class="emphasis"><em>id</em></span>·: | 251 | ········<span·class="emphasis"><em>id</em></span>·: |
252 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> | 252 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> |
253 | ········<span·class="emphasis"><em>color</em></span>·: | 253 | ········<span·class="emphasis"><em>color</em></span>·: |
254 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148885560"></a>Abstract·Pointer</h3></div></div></div><p> | 254 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148914232"></a>Abstract·Pointer</h3></div></div></div><p> |
255 | A·pointer·connects·two·data·elements·and·can·itself·hold·information·by·its·properties. | 255 | A·pointer·connects·two·data·elements·and·can·itself·hold·information·by·its·properties. |
256 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148886584"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 256 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148915256"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
257 | ········<span·class="emphasis"><em>width</em></span>·: | 257 | ········<span·class="emphasis"><em>width</em></span>·: |
258 | ········</p><p>The·width·of·the·connection.</p></li><li·class="listitem"><p> | 258 | ········</p><p>The·width·of·the·connection.</p></li><li·class="listitem"><p> |
259 | ········<span·class="emphasis"><em>directed</em></span>·: | 259 | ········<span·class="emphasis"><em>directed</em></span>·: |
260 | ········</p><p>If·true,·the·connection·is·directed.·Otherwise·is·connection·is·undirected.</p></li><li·class="listitem"><p> | 260 | ········</p><p>If·true,·the·connection·is·directed.·Otherwise·is·connection·is·undirected.</p></li><li·class="listitem"><p> |
261 | ········<span·class="emphasis"><em>from</em></span>·: | 261 | ········<span·class="emphasis"><em>from</em></span>·: |
262 | ········</p><p>Start·of·the·connection.</p></li><li·class="listitem"><p> | 262 | ········</p><p>Start·of·the·connection.</p></li><li·class="listitem"><p> |
263 | ········<span·class="emphasis"><em>to</em></span>·: | 263 | ········<span·class="emphasis"><em>to</em></span>·: |
264 | ········</p><p>End·of·the·connection</p></li><li·class="listitem"><p> | 264 | ········</p><p>End·of·the·connection</p></li><li·class="listitem"><p> |
265 | ········<span·class="emphasis"><em>color</em></span>·: | 265 | ········<span·class="emphasis"><em>color</em></span>·: |
266 | ········</p><p>ID·of·the·connection·type.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148899512"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">remove()</span></dt><dd><p>Remove·this·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">remove</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">add_property(name,·value)</span></dt><dd><p>Add·a·new·property·to·the·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">add_property</b>(</code></td><td><var·class="pdparam">name</var>,·</td><td> ·✂ | 266 | ········</p><p>ID·of·the·connection·type.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148924088"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">remove()</span></dt><dd><p>Remove·this·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">remove</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">add_property(name,·value)</span></dt><dd><p>Add·a·new·property·to·the·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">add_property</b>(</code></td><td><var·class="pdparam">name</var>,·</td><td> ·✂ |
267 | ····The·data·structure·properties·dialog·allows·access·to·configure·settings·specific·to·the·Graph·backend. | 267 | ····The·data·structure·properties·dialog·allows·access·to·configure·settings·specific·to·the·Graph·backend. |
268 | ····There,·with·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Graph·Type</span></span>·you·can·select·the·type·of·the·graph.·The·meaning·of·these·types·is·as·follows: | 268 | ····There,·with·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Graph·Type</span></span>·you·can·select·the·type·of·the·graph.·The·meaning·of·these·types·is·as·follows: |
269 | </p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 269 | </p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
270 | ····<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Graph</span></span>:·Graph·at·which·same·edges·(with·respect·to·start·and·end·points)·may·not·exist·multiple·times. | 270 | ····<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Graph</span></span>:·Graph·at·which·same·edges·(with·respect·to·start·and·end·points)·may·not·exist·multiple·times. |
271 | ····</p></li><li·class="listitem"><p> | 271 | ····</p></li><li·class="listitem"><p> |
272 | ····<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Multigraph</span></span>:·Graph·at·which·same·edges·(with·respect·to·start·and·end·points)·may·exist·multiple·times. | 272 | ····<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Multigraph</span></span>:·Graph·at·which·same·edges·(with·respect·to·start·and·end·points)·may·exist·multiple·times. |
273 | ····</p></li></ul></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148953272"></a>Graph·Data·Structure</h3></div></div></div><p> | 273 | ····</p></li></ul></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp148977848"></a>Graph·Data·Structure</h3></div></div></div><p> |
274 | A·graph·objects·holds·the·information·of·a·data·structure·of·type·<span·class="quote">“<span·class="quote">Graph</span>”</span>. | 274 | A·graph·objects·holds·the·information·of·a·data·structure·of·type·<span·class="quote">“<span·class="quote">Graph</span>”</span>. |
275 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148954680"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 275 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148979256"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
276 | ········<span·class="emphasis"><em>name</em></span>·: | 276 | ········<span·class="emphasis"><em>name</em></span>·: |
277 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148957368"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">nodes()</span></dt><dd><p>Return·list·all·nodes·in·the·graph.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">nodes</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">nodes(type)</span></dt><dd><p>Return·list·all·nodes·in·the·graph·of·specified·type.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">nodes</b>(</code></td><td><var·class="pdparam">ty·✂ | 277 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148981944"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">nodes()</span></dt><dd><p>Return·list·all·nodes·in·the·graph.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">nodes</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">nodes(type)</span></dt><dd><p>Return·list·all·nodes·in·the·graph·of·specified·type.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">nodes</b>(</code></td><td><var·class="pdparam">ty·✂ |
278 | A·node·is·the·data·element·of·a·graph. | 278 | A·node·is·the·data·element·of·a·graph. |
279 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp148992824"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 279 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149017400"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
280 | ········<span·class="emphasis"><em>width</em></span>·: | 280 | ········<span·class="emphasis"><em>width</em></span>·: |
281 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> | 281 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> |
282 | ········<span·class="emphasis"><em>x</em></span>·: | 282 | ········<span·class="emphasis"><em>x</em></span>·: |
283 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 283 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
284 | ········<span·class="emphasis"><em>y</em></span>·: | 284 | ········<span·class="emphasis"><em>y</em></span>·: |
285 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 285 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
286 | ········<span·class="emphasis"><em>id</em></span>·: | 286 | ········<span·class="emphasis"><em>id</em></span>·: |
287 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> | 287 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> |
288 | ········<span·class="emphasis"><em>color</em></span>·: | 288 | ········<span·class="emphasis"><em>color</em></span>·: |
289 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149001656"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">neighbors()</span></dt><dd><p>Return·list·all·nodes·connected·to·this·node.·This·method·respects·if·edges·are·directed.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">neighbors</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">edges()</span></dt><dd><p>Return·a·list·of·all·edges·(incoming·and·outgoing)·of·this·node.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code··✂ | 289 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149026232"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">neighbors()</span></dt><dd><p>Return·list·all·nodes·connected·to·this·node.·This·method·respects·if·edges·are·directed.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">array·<b·class="fsfunc">neighbors</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">edges()</span></dt><dd><p>Return·a·list·of·all·edges·(incoming·and·outgoing)·of·this·node.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code··✂ |
290 | An·Edge·is·the·connection·of·two·GraphNodes.·Edges·can·be·directed·or·undirected,·depending·on·their·type. | 290 | An·Edge·is·the·connection·of·two·GraphNodes.·Edges·can·be·directed·or·undirected,·depending·on·their·type. |
291 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149030584"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 291 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149059256"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
292 | ········<span·class="emphasis"><em>width</em></span>·: | 292 | ········<span·class="emphasis"><em>width</em></span>·: |
293 | ········</p><p>The·width·of·the·connection.</p></li><li·class="listitem"><p> | 293 | ········</p><p>The·width·of·the·connection.</p></li><li·class="listitem"><p> |
294 | ········<span·class="emphasis"><em>directed</em></span>·: | 294 | ········<span·class="emphasis"><em>directed</em></span>·: |
295 | ········</p><p>If·true,·the·connection·is·directed.·Otherwise·is·connection·is·undirected.</p></li><li·class="listitem"><p> | 295 | ········</p><p>If·true,·the·connection·is·directed.·Otherwise·is·connection·is·undirected.</p></li><li·class="listitem"><p> |
296 | ········<span·class="emphasis"><em>from</em></span>·: | 296 | ········<span·class="emphasis"><em>from</em></span>·: |
297 | ········</p><p>Start·of·the·connection.</p></li><li·class="listitem"><p> | 297 | ········</p><p>Start·of·the·connection.</p></li><li·class="listitem"><p> |
298 | ········<span·class="emphasis"><em>to</em></span>·: | 298 | ········<span·class="emphasis"><em>to</em></span>·: |
299 | ········</p><p>End·of·the·connection</p></li><li·class="listitem"><p> | 299 | ········</p><p>End·of·the·connection</p></li><li·class="listitem"><p> |
300 | ········<span·class="emphasis"><em>color</em></span>·: | 300 | ········<span·class="emphasis"><em>color</em></span>·: |
301 | ········</p><p>ID·of·the·connection·type.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149039416"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">remove()</span></dt><dd><p>Remove·this·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">remove</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">add_property(name,·value)</span></dt><dd><p>Add·a·new·property·to·the·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">add_property</b>(</code></td><td><var·class="pdparam">name</var>,·</td><td> ·✂ | 301 | ········</p><p>ID·of·the·connection·type.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149068088"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">remove()</span></dt><dd><p>Remove·this·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">remove</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">add_property(name,·value)</span></dt><dd><p>Add·a·new·property·to·the·connection.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">add_property</b>(</code></td><td><var·class="pdparam">name</var>,·</td><td> ·✂ |
302 | A·list·objects·holds·the·information·of·a·data·structure·of·type·<span·class="quote">“<span·class="quote">Linked·List</span>”</span>. | 302 | A·list·objects·holds·the·information·of·a·data·structure·of·type·<span·class="quote">“<span·class="quote">Linked·List</span>”</span>. |
303 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149164344"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 303 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149193016"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
304 | ········<span·class="emphasis"><em>name</em></span>·: | 304 | ········<span·class="emphasis"><em>name</em></span>·: |
305 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149171128"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">head()</span></dt><dd><p>Return·head·node·of·the·list.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">ListNode·<b·class="fsfunc">head</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">setHead(node)</span></dt><dd><p>Set·the·head·of·the·list.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">setHead</b>(</code></td><td><var·class="pdparam">node</var><code>)</code>;</td><t·✂ | 305 | ········</p><p>The·unique·name·of·this·data·structure.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149195704"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">head()</span></dt><dd><p>Return·head·node·of·the·list.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">ListNode·<b·class="fsfunc">head</b>(</code></td><td><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code></code>;</div><div·class="funcprototype-spacer"> </div></div></dd><dt><span·class="term">setHead(node)</span></dt><dd><p>Set·the·head·of·the·list.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">setHead</b>(</code></td><td><var·class="pdparam">node</var><code>)</code>;</td><t·✂ |
306 | A·node·is·the·data·element·of·a·linked·list. | 306 | A·node·is·the·data·element·of·a·linked·list. |
307 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149186872"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> | 307 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149211448"></a>Properties</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p> |
308 | ········<span·class="emphasis"><em>width</em></span>·: | 308 | ········<span·class="emphasis"><em>width</em></span>·: |
309 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> | 309 | ········</p><p>The·size·of·this·data·element.</p></li><li·class="listitem"><p> |
310 | ········<span·class="emphasis"><em>x</em></span>·: | 310 | ········<span·class="emphasis"><em>x</em></span>·: |
311 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 311 | ········</p><p>The·x-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
312 | ········<span·class="emphasis"><em>y</em></span>·: | 312 | ········<span·class="emphasis"><em>y</em></span>·: |
313 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> | 313 | ········</p><p>The·y-coordinate·of·this·data·element.</p></li><li·class="listitem"><p> |
314 | ········<span·class="emphasis"><em>id</em></span>·: | 314 | ········<span·class="emphasis"><em>id</em></span>·: |
315 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> | 315 | ········</p><p>The·unique·identifier·of·this·data·element.</p></li><li·class="listitem"><p> |
316 | ········<span·class="emphasis"><em>color</em></span>·: | 316 | ········<span·class="emphasis"><em>color</em></span>·: |
317 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149195704"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">pointTo(target)</span></dt><dd><p>Set·pointer·of·this·list·node·to·the·target·node.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">pointTo</b>(</code></td><td><var·class="pdparam">target</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>ListNode·<var·class="pdparam">target</var></code>;</div><div·class="funcprototype-spacer"> </div></div></dd></dl></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="ch04s02.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.htm·✂ | 317 | ········</p><p>The·color·of·this·data·element·stated·as·hexadecimal·value.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149220280"></a>Methods</h4></div></div></div><div·class="variablelist"><dl><dt><span·class="term">pointTo(target)</span></dt><dd><p>Set·pointer·of·this·list·node·to·the·target·node.</p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">pointTo</b>(</code></td><td><var·class="pdparam">target</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>ListNode·<var·class="pdparam">target</var></code>;</div><div·class="funcprototype-spacer"> </div></div></dd></dl></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="ch04s02.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.htm·✂ |
318 | ····The·data·structure·properties·dialog·allows·access·to·configure·settings·specific·to·the·Graph·backend. | 318 | ····The·data·structure·properties·dialog·allows·access·to·configure·settings·specific·to·the·Graph·backend. |
319 | ····There,·by·checking·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Show·all·pointers</span></span>·property,·all·pointers·between·the·tree·nodes·are·shown. | 319 | ····There,·by·checking·the·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guilabel">Show·all·pointers</span></span>·property,·all·pointers·between·the·tree·nodes·are·shown. |
320 | ····If·unchecked,·multiple·pointers·between·same·nodes·are·collapsed·to·one. | 320 | ····If·unchecked,·multiple·pointers·between·same·nodes·are·collapsed·to·one. |
321 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149237304"></a>The·Rooted·Tree·Structure</h3></div></div></div><p> | 321 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149261880"></a>The·Rooted·Tree·Structure</h3></div></div></div><p> |
322 | Given·a·data·structure·object·of·type·"Rooted·Tree",·the·following·properties·can·be·read·or·written: | 322 | Given·a·data·structure·object·of·type·"Rooted·Tree",·the·following·properties·can·be·read·or·written: |
323 | </p><pre·class="programlisting"> | 323 | </p><pre·class="programlisting"> |
324 | ····ShowAllPointers·····//·set·to·true·if·show·all·edges,·set·to·false·if·multiple·edges·shall·be·compressed | 324 | ····ShowAllPointers·····//·set·to·true·if·show·all·edges,·set·to·false·if·multiple·edges·shall·be·compressed |
325 | </pre><p> | 325 | </pre><p> |
326 | Given·a·data·structure·object·of·type·"Rooted·Tree",·you·can·call·the·following·member·functions: | 326 | Given·a·data·structure·object·of·type·"Rooted·Tree",·you·can·call·the·following·member·functions: |
327 | </p><pre·class="programlisting"> | 327 | </p><pre·class="programlisting"> |
328 | ····node·add_data(string·name);·········//·add·a·node·to·tree·with·given·name | 328 | ····node·add_data(string·name);·········//·add·a·node·to·tree·with·given·name |
329 | ····void·set_root_node(node·root);······//·set·root·as·root·node·of·the·tree | 329 | ····void·set_root_node(node·root);······//·set·root·as·root·node·of·the·tree |
330 | ····node·root_node();···················//·return·root·node·of·the·tree | 330 | ····node·root_node();···················//·return·root·node·of·the·tree |
331 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149239608"></a>Rooted·Tree·Nodes</h3></div></div></div><p> | 331 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149264184"></a>Rooted·Tree·Nodes</h3></div></div></div><p> |
332 | Given·a·node·object·of·type·"Rooted·Tree",·the·following·properties·can·be·read·or·written: | 332 | Given·a·node·object·of·type·"Rooted·Tree",·the·following·properties·can·be·read·or·written: |
333 | </p><pre·class="programlisting"> | 333 | </p><pre·class="programlisting"> |
334 | ····int·numberOfChilds··················//·set·the·number·of·(allowed)·children·for·this·node | 334 | ····int·numberOfChilds··················//·set·the·number·of·(allowed)·children·for·this·node |
335 | ····node·left_child·····················//·read·only:·node·that·is·the·left·child | 335 | ····node·left_child·····················//·read·only:·node·that·is·the·left·child |
336 | ····node·right_child····················//·read·only:·node·that·is·the·right·child | 336 | ····node·right_child····················//·read·only:·node·that·is·the·right·child |
337 | ····node·node_parent····················//·read·only:·node·that·is·the·parent | 337 | ····node·node_parent····················//·read·only:·node·that·is·the·parent |
338 | </pre><p> | 338 | </pre><p> |
Offset 342, 60 lines modified | Offset 342, 60 lines modified |
342 | ····node·add_right_child(node·child);···//·add·right·child | 342 | ····node·add_right_child(node·child);···//·add·right·child |
343 | ····node·add_child(node·child,·int·i);··//·add·a·child·as·the·i-th·child·of·the·node | 343 | ····node·add_child(node·child,·int·i);··//·add·a·child·as·the·i-th·child·of·the·node |
344 | ····node·add_node_parent(node·child);···//·add·parent·(only·successful·if·no·parent·set,·yet) | 344 | ····node·add_node_parent(node·child);···//·add·parent·(only·successful·if·no·parent·set,·yet) |
345 | ····node·left_child();··················//·return·right·child | 345 | ····node·left_child();··················//·return·right·child |
346 | ····node·right_child();·················//·return·left·child | 346 | ····node·right_child();·················//·return·left·child |
347 | ····node·child_at(int·i);···············//·return·the·i-th·child·of·the·node | 347 | ····node·child_at(int·i);···············//·return·the·i-th·child·of·the·node |
348 | ····node·node_parent();·················//·return·the·node's·parent | 348 | ····node·node_parent();·················//·return·the·node's·parent |
349 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149241912"></a>Rooted·Tree·Edges</h3></div></div></div><p> | 349 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149266488"></a>Rooted·Tree·Edges</h3></div></div></div><p> |
350 | Given·edges·of·a·data·structure·of·type·"Rooted·Tree",·only·the·properties·of·the·base·data·structure·are·available. | 350 | Given·edges·of·a·data·structure·of·type·"Rooted·Tree",·only·the·properties·of·the·base·data·structure·are·available. |
351 | </p></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="ch04s03.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="include-scripting-interface.html">Next</a></td></tr><tr><td·class="prevCell">Scripting·API·for·Linked·List·Backend </td><td·class="upCell">Scripting·Engine·API</td><td·class="nextCell"> Scripting·Interfaces</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="include-scripting-interface.html"><html><head><title>Scripting·Interfaces</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="·✂ | 351 | </p></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="ch04s03.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="include-scripting-interface.html">Next</a></td></tr><tr><td·class="prevCell">Scripting·API·for·Linked·List·Backend </td><td·class="upCell">Scripting·Engine·API</td><td·class="nextCell"> Scripting·Interfaces</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="include-scripting-interface.html"><html><head><title>Scripting·Interfaces</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="·✂ |
352 | ····The·Console·object·allows·you·to·print·messages·of·different·importance·to·a·log. | 352 | ····The·Console·object·allows·you·to·print·messages·of·different·importance·to·a·log. |
353 | </p><p> | 353 | </p><p> |
354 | ····Console·is·not·a·constructor.·All·properties·and·methods·of·Console·can·be·called·by·using·Console·as·an·object,·without·creating·it. | 354 | ····Console·is·not·a·constructor.·All·properties·and·methods·of·Console·can·be·called·by·using·Console·as·an·object,·without·creating·it. |
355 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149258040"></a>Syntax</h3></div></div></div><pre·class="programlisting"> | 355 | </p></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149278520"></a>Syntax</h3></div></div></div><pre·class="programlisting"> |
356 | Console.log("This·is·a·program·message.");·//·print·a·program·message | 356 | Console.log("This·is·a·program·message.");·//·print·a·program·message |
357 | Console.debug("A·debug·message.");·//·print·a·debug·message | 357 | Console.debug("A·debug·message.");·//·print·a·debug·message |
358 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149259192"></a>Console·Object·Methods</h3></div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149259832"></a>log()</h4></div></div></div><p> | 358 | </pre></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="idp149279672"></a>Console·Object·Methods</h3></div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149280312"></a>log()</h4></div></div></div><p> |
359 | ····Print·the·given·message·of·normal·severity. | 359 | ····Print·the·given·message·of·normal·severity. |
360 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">log</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149263032"></a>debug()</h4></div></div></div><p> | 360 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">log</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149283512"></a>debug()</h4></div></div></div><p> |
361 | ····Print·the·given·debug·message. | 361 | ····Print·the·given·debug·message. |
362 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">debug</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149266232"></a>error()</h4></div></div></div><p> | 362 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">debug</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149286712"></a>error()</h4></div></div></div><p> |
363 | ····Print·the·given·error·message·of·high·severity. | 363 | ····Print·the·given·error·message·of·high·severity. |
364 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">error</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="scripting-backend-rootedtree.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="import-export.html">Next</a></td></tr><tr><td·class="prevCell">Scripting·API·for·Rooted·Tree·Backend </td><td·class="upCell">Scripting·Engine·API</td><td·class="nextCell"> Import·and·Export</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·t·✂ | 364 | </p><div·class="funcsynopsis"><table·border="0"·summary="Function·synopsis"·cellspacing="0"·cellpadding="0"·class="funcprototype-table"><tr><td><code·class="funcdef">void·<b·class="fsfunc">error</b>(</code></td><td><var·class="pdparam">message</var><code>)</code>;</td><td> </td></tr></table><div·class="paramdef-list"><code>string·<var·class="pdparam">message</var></code>;</div><div·class="funcprototype-spacer"> </div></div></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="scripting-backend-rootedtree.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="import-export.html">Next</a></td></tr><tr><td·class="prevCell">Scripting·API·for·Rooted·Tree·Backend </td><td·class="upCell">Scripting·Engine·API</td><td·class="nextCell"> Import·and·Export</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·t·✂ |
365 | ········<span·class="application">Rocs</span>·projects·can·be·imported·and·exported·as·archived·<code·class="literal">.tar.gz</code>·files. | 365 | ········<span·class="application">Rocs</span>·projects·can·be·imported·and·exported·as·archived·<code·class="literal">.tar.gz</code>·files. |
366 | ········These·archives·can·be·used·to·exchange·projects. | 366 | ········These·archives·can·be·used·to·exchange·projects. |
367 | ········Import·and·Export·can·be·done·with·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Import·Graph</span></span>·and·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Export·Graph·as</span></span>,·respectively. | 367 | ········Import·and·Export·can·be·done·with·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Import·Graph</span></span>·and·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenu">Graph·Document</span></span>·→·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="guiitem"><span·class="guimenuitem">Export·Graph·as</span></span>,·respectively. |
368 | ····</p></div><FILENAME·filename="import-export-graphs.html"><html><head><title>Import·and·Export·of·Graph·Documents</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="import-export.html"·title="Chapter 5. Import·and·Export"><link·rel="prev"·href="import-export.html"·title="Chapter 5. Import·and·Export"><link·rel="next"·href="credits.html"·title="Chapter 6. Credits·and·License"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div··✂ | 368 | ····</p></div><FILENAME·filename="import-export-graphs.html"><html><head><title>Import·and·Export·of·Graph·Documents</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="import-export.html"·title="Chapter 5. Import·and·Export"><link·rel="prev"·href="import-export.html"·title="Chapter 5. Import·and·Export"><link·rel="next"·href="credits.html"·title="Chapter 6. Credits·and·License"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div··✂ |
369 | ····The·<span·class="emphasis"><em>Trivial·Graph·Format</em></span>·(TGF)·is·a·simple·text-based·file·format·for·describing·graphs. | 369 | ····The·<span·class="emphasis"><em>Trivial·Graph·Format</em></span>·(TGF)·is·a·simple·text-based·file·format·for·describing·graphs. |
370 | ····A·TGF·file·consists·of·a·list·of·node·definitions,·that·map·the·node·IDs·to·labels,·followed·by·a·list·of·the·edges. | 370 | ····A·TGF·file·consists·of·a·list·of·node·definitions,·that·map·the·node·IDs·to·labels,·followed·by·a·list·of·the·edges. |
371 | ····In·this·format·it·is·only·possible·to·have·one·label·per·node·and·one·value·per·edge. | 371 | ····In·this·format·it·is·only·possible·to·have·one·label·per·node·and·one·value·per·edge. |
372 | ····<span·class="application">Rocs</span>·interprets·imported·graphs·as·undirected·graphs. | 372 | ····<span·class="application">Rocs</span>·interprets·imported·graphs·as·undirected·graphs. |
373 | ····Exported·graphs·will·contain·two·edges·per·connection·if·connections·are·bidirectional. | 373 | ····Exported·graphs·will·contain·two·edges·per·connection·if·connections·are·bidirectional. |
374 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149298616"></a>Format·Specification</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>The·file·starts·with·a·list·of·nodes·(one·node·per·line),·followed·by·a·line·with·the·only·character·"#",·followed·by·a·list·of·edges·(one·edge·per·line).</p></li><li·class="listitem"><p>A·node·consists·of·an·integer·(identifier),·followed·by·a·space,·followed·by·an·arbitrary·string.</p></li><li·class="listitem"><p>An·edge·consists·of·two·integers·(identifiers)·separated·by·a·space,·followed·by·a·space,·followed·by·an·arbitrary·string.·It·is·assumed·that·the·directed·edge·points·from·the·first·identifier·to·the·second·identifier.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149301304"></a>Example</h4></div></div></div><pre·class="programlisting"> | 374 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149343672"></a>Format·Specification</h4></div></div></div><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>The·file·starts·with·a·list·of·nodes·(one·node·per·line),·followed·by·a·line·with·the·only·character·"#",·followed·by·a·list·of·edges·(one·edge·per·line).</p></li><li·class="listitem"><p>A·node·consists·of·an·integer·(identifier),·followed·by·a·space,·followed·by·an·arbitrary·string.</p></li><li·class="listitem"><p>An·edge·consists·of·two·integers·(identifiers)·separated·by·a·space,·followed·by·a·space,·followed·by·an·arbitrary·string.·It·is·assumed·that·the·directed·edge·points·from·the·first·identifier·to·the·second·identifier.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149346360"></a>Example</h4></div></div></div><pre·class="programlisting"> |
375 | 1·starting·node | 375 | 1·starting·node |
376 | 2·transmitter | 376 | 2·transmitter |
377 | 3·sink | 377 | 3·sink |
378 | # | 378 | # |
379 | 1·2·blue | 379 | 1·2·blue |
380 | 2·1·red | 380 | 2·1·red |
381 | 2·3·green | 381 | 2·3·green |
382 | </pre></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="format-specification-dot"></a>DOT·Language·/·Graphviz·Graph·File·Format</h3></div></div></div><p> | 382 | </pre></div></div><div·class="sect2"><div·class="titlepage"><div><div><h3·class="title"><a·name="format-specification-dot"></a>DOT·Language·/·Graphviz·Graph·File·Format</h3></div></div></div><p> |
383 | ····The·DOT·language·is·a·plain·text·graph·description·language·that·allows·both,a·good·human·readable·representation·of·graphs·as·well·as·an·efficient·processing·by·graph·layout·programs. | 383 | ····The·DOT·language·is·a·plain·text·graph·description·language·that·allows·both,a·good·human·readable·representation·of·graphs·as·well·as·an·efficient·processing·by·graph·layout·programs. |
384 | ····DOT·is·the·default·file·format·for·the·Graphviz·graph·visualization·suite,·but·is·also·widely·used·by·other·graph·tools. | 384 | ····DOT·is·the·default·file·format·for·the·Graphviz·graph·visualization·suite,·but·is·also·widely·used·by·other·graph·tools. |
385 | ····The·usual·file·endings·for·DOT·are·<span·class="emphasis"><em>.gv</em></span>·and·<span·class="emphasis"><em>.dot</em></span>. | 385 | ····The·usual·file·endings·for·DOT·are·<span·class="emphasis"><em>.gv</em></span>·and·<span·class="emphasis"><em>.dot</em></span>. |
386 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149304504"></a>Unsupported·Features</h4></div></div></div><p> | 386 | </p><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149349560"></a>Unsupported·Features</h4></div></div></div><p> |
387 | ····<span·class="application">Rocs</span>·can·parse·every·graph·file·that·contains·a·graph·specified·according·to·the·DOT·language·specification<sup>[<a·name="idp149305784"·href="#ftn.idp149305784"·class="footnote">1</a>]</sup>. | 387 | ····<span·class="application">Rocs</span>·can·parse·every·graph·file·that·contains·a·graph·specified·according·to·the·DOT·language·specification<sup>[<a·name="idp149350840"·href="#ftn.idp149350840"·class="footnote">1</a>]</sup>. |
388 | ····The·support·of·language·features·is·complete,·despite·of·the·following·exceptions: | 388 | ····The·support·of·language·features·is·complete,·despite·of·the·following·exceptions: |
389 | </p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>subgraph:·Due·to·the·lack·of·a·subgraph·concept·in·<span·class="application">Rocs</span>,·subgraphs·are·only·imported·as·a·set·of·date·elements·and·connections.·Especially,·connections·to·or·from·subgraphs·are·not·imported.</p></li><li·class="listitem"><p><acronym·class="acronym">HTML</acronym>·and·<acronym·class="acronym">XML</acronym>·attributes:·Attributes·(like·labels)·that·contain·<acronym·class="acronym">HTML</acronym>·or·<acronym·class="acronym">XML</acronym>·syntax·are·read·unchanged.·Especially,·not·adjustment·of·fonts·and·styles·are·read·from·those·attributes.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149310264"></a>Example</h4></div></div></div><pre·class="programlisting"> | 389 | </p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>subgraph:·Due·to·the·lack·of·a·subgraph·concept·in·<span·class="application">Rocs</span>,·subgraphs·are·only·imported·as·a·set·of·date·elements·and·connections.·Especially,·connections·to·or·from·subgraphs·are·not·imported.</p></li><li·class="listitem"><p><acronym·class="acronym">HTML</acronym>·and·<acronym·class="acronym">XML</acronym>·attributes:·Attributes·(like·labels)·that·contain·<acronym·class="acronym">HTML</acronym>·or·<acronym·class="acronym">XML</acronym>·syntax·are·read·unchanged.·Especially,·not·adjustment·of·fonts·and·styles·are·read·from·those·attributes.</p></li></ul></div></div><div·class="sect3"><div·class="titlepage"><div><div><h4·class="title"><a·name="idp149355320"></a>Example</h4></div></div></div><pre·class="programlisting"> |
390 | digraph·myGraph·{ | 390 | digraph·myGraph·{ |
391 | ····a·->·b·->·c; | 391 | ····a·->·b·->·c; |
392 | ····b·->·d; | 392 | ····b·->·d; |
393 | } | 393 | } |
394 | </pre></div></div><div·class="footnotes"><br><hr·width="100"·align="left"><div·class="footnote"><p><sup>[<a·id="ftn.idp149305784"·href="#idp149305784"·class="para">1</a>]·</sup>http://www.graphviz.org/content/dot-language</p></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="import-export.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="credits.html">Next</a></td></tr><tr><td·class="prevCell">Import·and·Export </td><td·class="upCell">Import·and·Export</td><td·class="nextCell"> Credits·and·License</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·cl·✂ | 394 | </pre></div></div><div·class="footnotes"><br><hr·width="100"·align="left"><div·class="footnote"><p><sup>[<a·id="ftn.idp149350840"·href="#idp149350840"·class="para">1</a>]·</sup>http://www.graphviz.org/content/dot-language</p></div></div></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="import-export.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="credits.html">Next</a></td></tr><tr><td·class="prevCell">Import·and·Export </td><td·class="upCell">Import·and·Export</td><td·class="nextCell"> Credits·and·License</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·cl·✂ |
395 | <span·class="application">Rocs</span> | 395 | <span·class="application">Rocs</span> |
396 | </p><p>Program·Copyright:</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Copyright·2008·······Ugo·Sangiori·(ugorox·AT·gmail.com)</p></li><li·class="listitem"><p>Copyright·2008-2012··Tomaz·Canabrava·(tcanabrava·AT·kde.org)</p></li><li·class="listitem"><p>Copyright·2008-2012··Wagner·Reck·(wagner.reck·AT·gmail.com)</p></li><li·class="listitem"><p>Copyright·2011-2013··Andreas·Cord-Landwehr·(cordlandwehr·AT·kde.org)</p></li></ul></div><p>Documentation·Copyright:</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Documentation·copyright·2009·<span·class="firstname">Anne-Marie</span>·<span·class="surname">Mahfouf</span>·<code·class="email">(annma·AT·kde.org)</code></p></li><li·class="listitem"><p>Documentation·copyright·2009·Tomaz·Canabrava·(tcanabrava·AT·kde.org)</p></li><li·class="listitem"><p>Documentation·copyright·2011-2013·Andreas·Cord-Landwehr·(cordlandwehr·AT·kde.org)</p></li></ul></div><p><a·name="gnu-fdl"></a>This·documentati·✂ | 396 | </p><p>Program·Copyright:</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Copyright·2008·······Ugo·Sangiori·(ugorox·AT·gmail.com)</p></li><li·class="listitem"><p>Copyright·2008-2012··Tomaz·Canabrava·(tcanabrava·AT·kde.org)</p></li><li·class="listitem"><p>Copyright·2008-2012··Wagner·Reck·(wagner.reck·AT·gmail.com)</p></li><li·class="listitem"><p>Copyright·2011-2013··Andreas·Cord-Landwehr·(cordlandwehr·AT·kde.org)</p></li></ul></div><p>Documentation·Copyright:</p><div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"><li·class="listitem"><p>Documentation·copyright·2009·<span·class="firstname">Anne-Marie</span>·<span·class="surname">Mahfouf</span>·<code·class="email">(annma·AT·kde.org)</code></p></li><li·class="listitem"><p>Documentation·copyright·2009·Tomaz·Canabrava·(tcanabrava·AT·kde.org)</p></li><li·class="listitem"><p>Documentation·copyright·2011-2013·Andreas·Cord-Landwehr·(cordlandwehr·AT·kde.org)</p></li></ul></div><p><a·name="gnu-fdl"></a>This·documentati·✂ |
397 | License</a>.</p><p>This·program·is·licensed·under·the·terms·of·the·<a·class="ulink"·href="common/gpl-license.html"·target="_top">GNU·General·Public·License</a>.</p></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="import-export-graphs.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="installation.html">Next</a></td></tr><tr><td·class="prevCell">Import·and·Export·of·Graph·Documents </td><td·class="upCell"> </td><td·class="nextCell"> Installation</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="installation.html"><html><head><title>Appendix A. Installation</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-d·✂ | 397 | License</a>.</p><p>This·program·is·licensed·under·the·terms·of·the·<a·class="ulink"·href="common/gpl-license.html"·target="_top">GNU·General·Public·License</a>.</p></div></div><div·id="footer"><div·class="navCenter"><table·class="navigation"><tr><td·class="prevCell"><a·accesskey="p"·href="import-export-graphs.html">Prev</a></td><td·class="upCell"><a·accesskey="h"·href="index.html">Contents</a></td><td·class="nextCell"><a·accesskey="n"·href="installation.html">Next</a></td></tr><tr><td·class="prevCell">Import·and·Export·of·Graph·Documents </td><td·class="upCell"> </td><td·class="nextCell"> Installation</td></tr></table></div><div·id="footer_text">Would·you·like·to·make·a·comment·or·contribute·an·update·to·this·page?<br>Send·feedback·to·the·<a·href="mailto:kde-doc-english@kde.org"·class="footer_email">KDE·Docs·Team</a></div></div></div></body></html></FILENAME><FILENAME·filename="installation.html"><html><head><title>Appendix A. Installation</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-d·✂ |
398 | the·main·<acronym·class="acronym">FTP</acronym>·site·of·the·<acronym·class="acronym">KDE</acronym>·project.</p></div><FILENAME·filename="compilation.html"><html><head><title>Compilation·and·installation</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="installation.html"·title="Appendix A. Installation"><link·rel="prev"·href="installation.html"·title="Appendix A. Installation"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div··✂ | 398 | the·main·<acronym·class="acronym">FTP</acronym>·site·of·the·<acronym·class="acronym">KDE</acronym>·project.</p></div><FILENAME·filename="compilation.html"><html><head><title>Compilation·and·installation</title><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-default.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-docs.css"><link·rel="stylesheet"·type="text/css"·href="help:/common/kde-localised.css"><meta·name="generator"·content="DocBook·XSL·Stylesheets·V1.76.1"><meta·name="keywords"·content="KDE,·kdeedu,·mathematics,·math,·graphs,·node,·edge"><link·rel="home"·href="index.html"·title="The·Rocs·Handbook"><link·rel="up"·href="installation.html"·title="Appendix A. Installation"><link·rel="prev"·href="installation.html"·title="Appendix A. Installation"><meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8"><meta·name="GENERATOR"·content="KDE·XSL·Stylesheet·V1.14·using·libxslt"></head><body·bgcolor="white"·text="black"·link="#0000FF"·vlink="#840084"·alink="#0000FF"><div··✂ |
399 | applications·see | 399 | applications·see |
400 | <a·class="ulink"·href="http://techbase.kde.org/Getting_Started#Building_and_Running_KDE_Software_From_Source"·target="_top"> | 400 | <a·class="ulink"·href="http://techbase.kde.org/Getting_Started#Building_and_Running_KDE_Software_From_Source"·target="_top"> |
401 | Building·and·Running·KDE·Software·From·Source</a></p><p>Since·<acronym·class="acronym">KDE</acronym>·uses·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="command"><span·class="command"><strong>cmake</strong></span></span>·you·should·have·no· | 401 | Building·and·Running·KDE·Software·From·Source</a></p><p>Since·<acronym·class="acronym">KDE</acronym>·uses·<span·xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"·class="command"><span·class="command"><strong>cmake</strong></span></span>·you·should·have·no· |