mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Vector comparer #174

Closed jolyonb closed 5 years ago

jolyonb commented 5 years ago

I'd really, really like a vector comparer that can ignore phases and/or normalization. I know we have one that requires an actual matrix, but I think we should be able to do it independently of a matrix...

ChristopherChudzicki commented 5 years ago

Sounds good. How about:

  1. vector_parallel_comparer checks that student's input is a nonzero vector parallel to given vector.
  2. vector_phase_comparer checks that two vectors are parallel and have the same magnitude

And if it was useful, also could have

  1. vector_span_comparer check that student's vector is in the span of of a bunch of other vectors.

With appropriate tolerances for everything (nonzeroness, smallness of orthogonal projection, ...)

I could do at least 1 and 2 later tonight if you want.

jolyonb commented 5 years ago

I don't have a use for 3 presently, but 1 and 2 would definitely be helpful!

ChristopherChudzicki commented 5 years ago

Resolved by #175