microsoft / pybryt

Python library for pedagogical auto-assessment
https://microsoft.github.io/pybryt
MIT License
63 stars 19 forks source link

Create a way to combine complexity classes #155

Closed chrispyles closed 2 years ago

chrispyles commented 2 years ago

Add a way for users to say e.g. "linear or logarithmic complexity" in a complexity annotation. One way to do this may be to overload the | operator: TimeComplexity(cplx.linear | cplx.logarithmic).

This would mean that the complexity classes would need to be instance of some other class instead of classes themselves. It may also be nice to define some commonly-used groups, e.g. sub-linear.