Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Matrices Course and Gauss Solver#307

Open
kevindeland wants to merge 40 commits intomasterfrom
gauss-solver-kevin
Open

Matrices Course and Gauss Solver#307
kevindeland wants to merge 40 commits intomasterfrom
gauss-solver-kevin

Conversation

Copy link
Contributor

kevindeland commented Feb 9, 2021

No description provided.

kevindeland added 30 commits November 23, 2020 13:24
plegner approved these changes Feb 9, 2021
Copy link
Member

plegner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! You can remove the left.svg and right.svg files, and there is also a bit of code cleanup we can do, e.g. removing/commenting out) the all console.log statements. (This last part could happen in a later PR if you prefer, or are still working on those components.)

kevindeland reacted with thumbs up emoji
plegner mentioned this pull request Feb 9, 2021
plegner reviewed Feb 9, 2021
move: (p: Point) => {
// Check that this row not equal to the other output
const row = clamp(Math.round((p.y - 20) / 40), 0, this.size - 1);
this.model[key] = row;
Copy link
Member

plegner Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the output rows need to be interactive right? They are the same (or swapped) as the input rows

kevindeland reacted with thumbs up emoji
plegner reviewed Feb 9, 2021

if (this.checkForSolvedIdentity()) {
console.log('Success!');
this.$step.tools.confetti();
Copy link
Member

plegner Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than showing confetti, maybe something more subtle like this.$step.addHint('correct')

Copy link
Contributor Author

kevindeland Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's definitely more appropriate, I just really wanted a chance to use the confetti

plegner reviewed Feb 9, 2021
let expr;
let value;
try {
// FIXME: @philipp this might throw an error, Not sure how else to handle it.
Copy link
Member

plegner Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I would just make factor a number (e.g. 1 or 0.5). We can allow things like 1/2 in the future, but then we should use a proper equation editor rather than an input field

Copy link
Contributor Author

kevindeland Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try this for now, but I'm not sure it would work with numbers like 1/3 or 1/12.

Copy link
Contributor Author

kevindeland Feb 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things to try:
(a) Rounding? With error margins?
(b) Just switch the problems until we add the expression editor.
(c) Ignore the problem (but China matrix will be close to unsolvable, as checkForSolvedIdentity checks for exact value)

plegner reviewed Feb 9, 2021
for (let j = 0; j < numRows; j++) {
// console.log(`Checking row=${i}; col=${j}; value=${values[j]}`);
if (j === i) {
if (values[j].text != '1') {
Copy link
Member

plegner Feb 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid storing state in the DOM. Rather than accessing .text (which is quite an expensive operation), we should just have a numeric, nested array that contains the current value of the output matrix

kevindeland reacted with thumbs up emoji
plegner changed the title Gauss solver from Monday meeting, with functionality added. Matrices Course and Gauss Solver Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

plegner plegner approved these changes

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants