Template:Infobox algorithm: Difference between revisions

Content deleted Content added
Add templatedata, document space complexity as as auxiliary per talk page, add links to time complexity and space complexity
Edit templatedata
Line 35:
<templatedata>
{
"description": "Infobox for an algorithm",
"params": {
"name": {
"label": "Name",
"description": "Name of algorithm",
"type": "content",
"required": true,
"default": "{{PAGENAMEBASE}}",
},
"autovalue": "{{PAGENAMEBASE}}",
"class": {
"requiredsuggested": true
"label": "Problem class",
},
"description": "Type of problem it solves (e.g., sorting)",
"class": {
"type": "content",
"label": "Problem class",
"required": true
"description": "Type of problem it solves (e.g., sorting)",
},
"imagetype": {"content",
"required": true,
"type": "content"
"example": "Sorting",
},
"captionautovalue": {"",
"suggested": true
"type": "content"
},
},
"dataimage": {
"type": "content",
"label": "Data structure",
"label": "Image"
"description": "Data structure it operates on (e.g., array)",
},
"type": "content"
"caption": {
},
"timetype": {"content",
"label": "Worst-case time complexityCaption",
},
"description": "Worst-case time complexity in big O notation",
"data": {
"type": "content",
"label": "Data structure",
"required": true
"description": "Data structure it operates on (e.g., array)",
},
"type": "content",
"best-time": {
"example": "Array"
"label": "Best-case time complexity",
},
"type": "content"
"time": {
},
"descriptionlabel": "Worst-case time complexity in big O notation",
"average-time": {
"labeldescription": "AverageWorst-case time complexity in big O notation",
"type": "content",
"required": true,
},
"spacesuggested": {true
},
"label": "Worst-case space complexity",
"requiredbest-time": true,{
"label": "Best-case time complexity",
"description": "If not specified, this should be auxiliary space complexity and not include the space needed for the input",
"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",
"suggested": true
},
"alt": {
"label": "Alt text",
"description": "Alt text for image",
"type": "string"
},
"size": {
"aliases": [
"image size",
"imagesize",
"image_size"
],
"label": "Image size"
}
},
"paramOrder": [
"name",
"class",
"image",
"size",
"caption",
"data",
"time",
"best-time": {,
"average-time",
"space",
"alt"
]
}
</templatedata>