How to create an algorithm: Difference between revisions
Jump to navigation
Jump to search
Rim Halaby (talk | contribs) No edit summary |
Rim Halaby (talk | contribs) |
||
Line 157: | Line 157: | ||
| bgcolor="#eeeeff" width="50%" align="left" | You type: | | bgcolor="#eeeeff" width="50%" align="left" | You type: | ||
{{familytree/start |summary= | '''<nowiki>{{familytree/start |summary=Sample 1}}</nowiki><br><nowiki>{{familytree | | | | | | | | A01 |A01=A01}} </nowiki><br><nowiki>{{familytree | | | | |,|-|-|-|^|-|-|-|-|.| | | }}</nowiki><br><nowiki>{{familytree | | | B01 | | | | | | | | B02 | | |B01=B01|B02=B02}}</nowiki><br><nowiki>{{familytree | | | |!| | | | | | | | | |!| }}</nowiki><br><nowiki>{{familytree | | | C01 | | | | | | | | |!| |C01=C01}}</nowiki><br><nowiki>{{familytree | |,|-|^|.| | | | | | | | |!| }}</nowiki><br><nowiki>{{familytree | D01 | | D02 | | | | | | D03 |D01=D01|D02=D02|D03=D03}}</nowiki><br><nowiki>{{familytree | |!| | | | | | | | | |,|-|^|.| }}</nowiki><br><nowiki>{{familytree | E01 | | | | | | | E02 | | | E03 |E01=E01|E02=E02|E03=E03}}</nowiki><br><nowiki>{{familytree | | | | | | | | | | |!| | | | |!| }}</nowiki><br><nowiki>{{familytree | | | | | | | | | | F01 | | | F02 |F01=F01|F02=F02}}</nowiki><br><nowiki>{{familytree/end}}</nowiki>''' | ||
{{familytree | | | | | | | | A01 |A01=A01}} | |||
{{familytree | | | | |,|-|-|-|^|-|-|-|-|.| | | }} | |||
{{familytree | | | B01 | | | | | | | | B02 | | |B01=B01|B02=B02}} | |||
{{familytree | | | |!| | | | | | | | | |!| }} | |||
{{familytree | | | C01 | | | | | | | | |!| |C01=C01}} | |||
{{familytree | |,|-|^|.| | | | | | | | |!| }} | |||
{{familytree | D01 | | D02 | | | | | | D03 |D01=D01|D02=D02|D03=D03}} | |||
{{familytree | |!| | | | | | | | | |,|-|^|.| }} | |||
{{familytree | E01 | | | | | | | E02 | | | E03 |E01=E01|E02=E02|E03=E03}} | |||
{{familytree | | | | | | | | | | |!| | | | |!| }} | |||
{{familytree | | | | | | | | | | F01 | | | F02 |F01=F01|F02=F02}} | |||
{{familytree/end}} | |||
| bgcolor="#ddddff" width="50%" align="left" | You get: | | bgcolor="#ddddff" width="50%" align="left" | You get: | ||
{{familytree/start |summary= | {{familytree/start |summary=Sample 1}} | ||
{{familytree | | | | | | | | A01 |A01=A01}} | {{familytree | | | | | | | | A01 |A01=A01}} | ||
{{familytree | | | | |,|-|-|-|^|-|-|-|-|.| | | }} | {{familytree | | | | |,|-|-|-|^|-|-|-|-|.| | | }} |
Revision as of 01:50, 19 August 2013
Overview
An algorithm is a schematic drawing that helps organizing step by step approaches in a visually simplified way. An algorithm is formed by a set of boxes and lines that join them.
Create an Algorithm
Introduction
- To begin an algorithm, you should start with the following code {{family tree/start}} and end it with {{family tree/end}}.
- You can name an algorithm by starting with following: {{family tree/summary= Name of the algorithm}}
- The algorithm consists of boxes that occupy virtual rows:
Box 1 in Row 1 | |||||||||||||||||||||||
Box 2 in Row 2 | |||||||||||||||||||||||
Box 3 in Row 3 | Box 4 in Row 3 | ||||||||||||||||||||||
- Each row is represented by the following where each | | represents a space.:
{{Family tree | | | | | | | | | }}
- Each box is represented by the content that fills the space in | |, for example | A01 | will give:
A01 | |||||||
- In order to link the boxes you need to use symbols. The basic symbols that you will most commonly use are the following:
- ! will link two boxes placed vertically on top of each other
- - will link two boxes placed horizontally next to each other
- ^ will link bifurcate a line arising from a box into two branches.
Step By Step
Linking cells horizontally: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Linking cells vertically: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
More | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type: | You get: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type: | You get: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type: | You get: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Putting it together: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{Family tree/start}} |
You get:
|
Samples
Samples of Algorithms | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
{{familytree/start |summary=Sample 1}} |
You get:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
|
You get:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
|
You get:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
You type:
|
You get:
|