Template:Infobox algorithm: Difference between revisions

Content deleted Content added
m Protected "Template:Infobox algorithm": Persistent vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite))
Add templatedata, document space complexity as as auxiliary per talk page, add links to time complexity and space complexity
Line 8:
| label2 = Data structure
| data2 = {{{data}}}
| label3 = [[Best, worst and average case|Worst-case]] [[Time complexity|performance]]
| data3 = {{{time}}}
| label4 = [[Best, worst and average case|Best-case]] [[Time complexity|performance]]
| data4 = {{{best-time|}}}
| label5 = [[Best, worst and average case|Average]] [[Time complexity|performance]]
| data5 = {{{average-time|}}}
| label6 = [[Best, worst and average case|Worst-case]] [[space complexity]]
| data6 = {{{space}}}
}}<noinclude>
Line 29:
|best-time =
|average-time =
|space = <!-- Worst-case space complexity; auxiliary space
(excluding input) if not specified -->
}}
</pre>
<templatedata>
{
"description": "Infobox for an algorithm",
"params": {
"name": {
"label": "Name",
"description": "Name of algorithm",
"type": "content",
"required": true
},
"class": {
"label": "Problem class",
"description": "Type of problem it solves (e.g., sorting)",
"type": "content",
"required": true
},
"image": {
"type": "content"
},
"caption": {
"type": "content"
},
"data": {
"label": "Data structure",
"description": "Data structure it operates on (e.g., array)",
"type": "content"
},
"time": {
"label": "Worst-case time complexity",
"description": "Worst-case time complexity in big O notation",
"type": "content",
"required": true
},
"best-time": {
"label": "Best-case time complexity",
"type": "content"
},
"average-time": {
"label": "Average time complexity",
"type": "content"
},
"space": {
"label": "Worst-case space complexity",
"required": true,
"description": "If not specified, this should be auxiliary space complexity and not include the space needed for the input",
"type": "content"
}
}
}
</templatedata>
}}
[[Category:Computer science infobox templates|Algorithm]]