1329 lines
75 KiB
HTML
1329 lines
75 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en"><script src="Intra%20Projects%20matrix%20Edit_files/inject.js"></script><head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<meta charset="utf-8">
|
||
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
|
||
<meta content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0" name="viewport">
|
||
<meta content="yes" name="mobile-web-app-capable">
|
||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||
<meta content="translucent-black" name="apple-mobile-web-app-status-bar-style">
|
||
<meta content="Intranet 42" name="apple-mobile-web-app-title">
|
||
<meta content="on" http-equiv="cleartype">
|
||
<link href="https://cdn.intra.42.fr/" rel="preconnect">
|
||
<link href="https://projects.intra.42.fr/assets/42_logo_black-684989d43d629b3c0ff6fd7e1157ee04db9bb7a73fba8ec4e01543d650a1c607.png" rel="icon" type="image/png">
|
||
<link href="https://projects.intra.42.fr/assets/42_logo_black-684989d43d629b3c0ff6fd7e1157ee04db9bb7a73fba8ec4e01543d650a1c607.png" rel="shortcut icon" type="image/png">
|
||
<link href="https://projects.intra.42.fr/opensearch.xml" rel="search" title="project" type="application/opensearchdescription+xml">
|
||
<title>Intra Projects matrix Edit</title>
|
||
<link rel="stylesheet" media="all" href="/lescrampte/css/correction.css" />
|
||
<link rel="stylesheet" media="screen" href="https://use.typekit.net/bzd7hlb.css">
|
||
|
||
</head><body class=" ">
|
||
<div class="container-item scale-team-container">
|
||
<div class="row mt-4">
|
||
<div class="scale-section-infos col-sm-12 scale-div">
|
||
<h3 class="font-weight-bold text-uppercase text-center mt-4 pt-4">
|
||
Scale for project Matrix
|
||
</h3>
|
||
|
||
<hr>
|
||
<div class="p-0 scale-introduction dancer from-down" id="introduction-38626">
|
||
<h3 class="font-weight-bold mb-1">Introduction</h3>
|
||
<p>
|
||
- Remain polite, courteous, respectful and constructive<br>throughout the evaluation process. The well-being of the community<br>depends on it.<br><br>- Identify with the person (or the group) evaluated the eventual<br>dysfunctions of the work. Take the time to discuss<br>and debate the problems you have identified.<br><br>- You must consider that there might be some difference in how your<br>peers might have understood the project's instructions and the<br>scope of its functionalities. Always keep an open mind and grade<br>him/her as honestly as possible. The pedagogy is valid only and<br>only if peer-evaluation is conducted seriously.<br>
|
||
</p>
|
||
</div>
|
||
<div class="p-0 scale-guidelines dancer from-down" id="guidelines-38626">
|
||
<h3 class="font-weight-bold mb-1">Guidelines</h3>
|
||
<p>
|
||
- Only grade the work that is in the student or group's<br>GiT repository.<br><br>- Double-check that the GiT repository belongs to the student<br>or the group. Ensure that the work is for the relevant project<br>and also check that "git clone" is used in an empty folder.<br><br>- Check carefully that no malicious aliases was used to fool you<br>and make you evaluate something other than the content of the<br>official repository.<br><br>- To avoid any surprises, carefully check that both the evaluating<br>and the evaluated students have reviewed the possible scripts used<br>to facilitate the grading.<br><br>- If the evaluating student has not completed that particular<br>project yet, it is mandatory for this student to read the<br>entire subject prior to starting the defence.<br><br>- Use the flags available on this scale to signal an empty repository,<br>non-functioning program, a norm error, cheating etc. In these cases,<br>the grading is over and the final grade is 0 (or -42 in case of<br>cheating). However, with the exception of cheating, you are<br>encouraged to continue to discuss your work (even if you have not<br>finished it) in order to identify any issues that may have caused<br>this failure and avoid repeating the same mistake in the future.<br><br>- Remember that for the duration of the defence, no segfault,<br>no other unexpected, premature, uncontrolled or unexpected<br>termination of the program, else the final grade is 0. Use the<br>appropriate flag. <br>You should never have to edit any file except the configuration file if it exists.<br>If you want to edit a file, take the time to explicit the reasons with the <br>evaluated student and make sure both of you are okay with this.<br><br>- You must also verify the absence of memory leaks. Any memory allocated on the heap must<br>be properly freed before the end of execution.<br>You are allowed to use any of the different tools available on the computer, such as<br>leaks, valgrind, or e_fence. In case of memory leaks, tick the appropriate flag.<br>
|
||
</p>
|
||
</div>
|
||
|
||
<hr>
|
||
<div class="dancer from-down" id="attachments-38626">
|
||
<h3 class="font-weight-bold mb-1">Attachments</h3>
|
||
<div class="project-attachments-list">
|
||
</div>
|
||
|
||
<div class="project-attachments-list">
|
||
<div class="project-attachment-item">
|
||
<h4 class="attachment-name">
|
||
<span class="icon-note-paper-2"></span>
|
||
<a target="_blank" href="https://cdn.intra.42.fr/pdf/pdf/146808/en.subject.pdf">subject.pdf</a>
|
||
</h4>
|
||
</div>
|
||
<div class="project-attachment-item">
|
||
<h4 class="attachment-name">
|
||
<span class="icon-folder-zip"></span>
|
||
<a target="_blank" href="https://cdn.intra.42.fr/document/document/29490/display_macos.tar.gz">display_macos.tar.gz</a>
|
||
</h4>
|
||
</div>
|
||
<div class="project-attachment-item">
|
||
<h4 class="attachment-name">
|
||
<span class="icon-folder-zip"></span>
|
||
<a target="_blank" href="https://cdn.intra.42.fr/document/document/29491/display_linux.tar.gz">display_linux.tar.gz</a>
|
||
</h4>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
<form class="simple_form form-horizontal" novalidate="novalidate" id="edit_scale_team_8766079" action="/projects/matrix/project_sessions/6803/evaluations/4591/scales/38626/scale_teams/8766079" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓"><input type="hidden" name="_method" value="patch"><input type="hidden" name="authenticity_token" value="T3mD4cEy4MuRHaZSoxdZ5Q+g7JbzHikCo7N5T8HgTfbriCbhlj66EvNM4UzQC7mYYfpRSOI3Cn5ojDNVQNzkDg=="><div class="scale-section-answers col-sm-12 scale-div">
|
||
<section class="scale-section-item dancer from-down" id="section-105800">
|
||
<div class="section-header">
|
||
<h3 class="font-weight-bold mb-1">Exercise 00 - Add, Subtract and Multiply</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the functions. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][0][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359685" name="[scale_team][answers_attributes][0][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][0][value]" id="radio_[scale_team][answers_attributes][0]_true" type="radio" value="1" checked="checked">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][0]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][0][value]" id="radio_[scale_team][answers_attributes][0]_false" type="radio" value="0">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][0]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Add</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the vector addition with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[0, 0]' and '[0, 0]' give '[0, 0]'</li>
|
||
<li>'[1, 0]' and '[0, 1]' give '[1, 1]'</li>
|
||
<li>'[1, 1]' and '[1, 1]' give '[2, 2]'</li>
|
||
<li>'[21, 21]' and '[21, 21]' give '[42, 42]'</li>
|
||
<li>'[-21, 21]' and '[21, -21]' give '[0, 0]'</li>
|
||
<li>'[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]' and '[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]' give '[9, 9, 9, 9, 9, 9, 9, 9, 9, 9]'</li>
|
||
</ul>
|
||
|
||
<p>Check the behaviour of the matrix addition with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' and '[[0, 0], [0, 0]]' give '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[1, 0], [0, 1]]' and '[[0, 0], [0, 0]]' give '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[1, 1], [1, 1]]' and '[[1, 1], [1, 1]]' give '[[2, 2], [2, 2]]'</li>
|
||
<li>'[[21, 21], [21, 21]]' and '[[21, 21], [21, 21]]' give '[[42, 42], [42, 42]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][1][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359686" name="[scale_team][answers_attributes][1][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][1][value]" id="radio_[scale_team][answers_attributes][1]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][1]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][1][value]" id="radio_[scale_team][answers_attributes][1]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][1]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Subtract</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of vector subtraction with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[0, 0]' and '[0, 0]' give '[0, 0]'</li>
|
||
<li>'[1, 0]' and '[0, 1]' give '[1, -1]'</li>
|
||
<li>'[1, 1]' and '[1, 1]' give '[0, 0]'</li>
|
||
<li>'[21, 21]' and '[21, 21]' give '[0, 0]'</li>
|
||
<li>'[-21, 21]' and '[21, -21]' give '[-42, 42]'</li>
|
||
<li>'[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]' and '[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]' give '[-9, -7, -5, -3, -1, 1, 3, 5, 7, 9]'</li>
|
||
</ul>
|
||
|
||
<p>Check the behaviour of matrix subtraction with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' and '[[0, 0], [0, 0]]' give '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[1, 0], [0, 1]]' and '[[0, 0], [0, 0]]' give '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[1, 1], [1, 1]]' and '[[1, 1], [1, 1]]' give '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[21, 21], [21, 21]]' and '[[21, 21], [21, 21]]' give '[[0, 0], [0, 0]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][2][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359687" name="[scale_team][answers_attributes][2][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][2][value]" id="radio_[scale_team][answers_attributes][2]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][2]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][2][value]" id="radio_[scale_team][answers_attributes][2]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][2]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Multiply</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of vector scaling with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[0, 0]' and '1' give '[0, 0]'</li>
|
||
<li>'[1, 0]' and '1' give '[1, 0]'</li>
|
||
<li>'[1, 1]' and '2' give '[2, 2]'</li>
|
||
<li>'[21, 21]' and '2' give '[42, 42]'</li>
|
||
<li>'[42, 42]' and '0.5' give '[21, 21]'</li>
|
||
</ul>
|
||
|
||
<p>Check the behaviour of matrix scaling with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' and '0' give '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[1, 0], [0, 1]]' and '1' give '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[1, 2], [3, 4]]' and '2' give '[[2, 4], [6, 8]]'</li>
|
||
<li>'[[21, 21], [21, 21]]' and '0.5' give '[[10.5, 10.5], [10.5, 10.5]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][3][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359688" name="[scale_team][answers_attributes][3][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][3][value]" id="radio_[scale_team][answers_attributes][3]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][3]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][3][value]" id="radio_[scale_team][answers_attributes][3]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][3]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105801">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 01 - Linear combination</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][4][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359689" name="[scale_team][answers_attributes][4][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][4][value]" id="radio_[scale_team][answers_attributes][4]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][4]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][4][value]" id="radio_[scale_team][answers_attributes][4]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][4]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Test the behaviour of linear combinations of vectors with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'linear_combination([Vector::from([-42., 42.])], [-1.])' gives '[42., -42.]'</li>
|
||
<li>'linear_combination([Vector::from([-42.]), Vector::from([-42.]), Vector::from([-42.])], [-1., 1., 0.])' gives '[0.]'</li>
|
||
<li>'linear_combination([Vector::from([-42., 42.]), Vector::from([1.,
|
||
3.]), Vector::from([10., 20.])], [1., -10., -1.])' gives '[-62., -8.]'</li>
|
||
<li>'linear_combination([Vector::from([-42., 100., -69.5]), Vector::from([1., 3., 5.])], [1., -10.])' gives '[-52., 70., -119.5]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][5][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359690" name="[scale_team][answers_attributes][5][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][5][value]" id="radio_[scale_team][answers_attributes][5]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][5]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][5][value]" id="radio_[scale_team][answers_attributes][5]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][5]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105802">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 02 - Linear interpolation</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][6][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359691" name="[scale_team][answers_attributes][6][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][6][value]" id="radio_[scale_team][answers_attributes][6]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][6]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][6][value]" id="radio_[scale_team][answers_attributes][6]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][6]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'lerp(0., 1., 0.)' gives '0.'</li>
|
||
<li>'lerp(0., 1., 1.)' gives '1.'</li>
|
||
<li>'lerp(0., 42., 0.5)' gives '21.'</li>
|
||
<li>'lerp(-42., 42., 0.5)' gives '0.'</li>
|
||
<li>'lerp(Vector::from([-42., 42.]), Vector::from([42., -42.]), 0.5)' gives '[0.0] [0.0]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][7][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359692" name="[scale_team][answers_attributes][7][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][7][value]" id="radio_[scale_team][answers_attributes][7]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][7]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][7][value]" id="radio_[scale_team][answers_attributes][7]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][7]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105803">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 03 - Dot product</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][8][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359693" name="[scale_team][answers_attributes][8][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][8][value]" id="radio_[scale_team][answers_attributes][8]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][8]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][8][value]" id="radio_[scale_team][answers_attributes][8]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][8]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[0, 0]' and '[0, 0]' gives '0'</li>
|
||
<li>'[1, 0]' and '[0, 0]' gives '0'</li>
|
||
<li>'[1, 0]' and '[1, 0]' gives '1'</li>
|
||
<li>'[1, 0]' and '[0, 1]' gives '0'</li>
|
||
<li>'[1, 1]' and '[1, 1]' gives '2'</li>
|
||
<li>'[4, 2]' and '[2, 1]' gives '10'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][9][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359694" name="[scale_team][answers_attributes][9][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][9][value]" id="radio_[scale_team][answers_attributes][9]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][9]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][9][value]" id="radio_[scale_team][answers_attributes][9]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][9]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105804">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 04 - Norm</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the functions. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][10][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359695" name="[scale_team][answers_attributes][10][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][10][value]" id="radio_[scale_team][answers_attributes][10]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][10]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][10][value]" id="radio_[scale_team][answers_attributes][10]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][10]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Euclidean norm</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[0]' returns '0'.</li>
|
||
<li>'[1]' returns '1'.</li>
|
||
<li>'[0, 0]' returns '0'.</li>
|
||
<li>'[1, 0]' returns '1'.</li>
|
||
<li>'[2, 1]' returns '2.236067977'.</li>
|
||
<li>'[4, 2]' returns '4.472135955'.</li>
|
||
<li>'[-4, -2]' returns '4.472135955'.</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][11][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359696" name="[scale_team][answers_attributes][11][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][11][value]" id="radio_[scale_team][answers_attributes][11]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][11]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][11][value]" id="radio_[scale_team][answers_attributes][11]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][11]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Manhattan norm</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><ul>
|
||
<li>'[0]' returns '0'.</li>
|
||
<li>'[1]' returns '1'.</li>
|
||
<li>'[0, 0]' returns '0'.</li>
|
||
<li>'[1, 0]' returns '1'.</li>
|
||
<li>'[2, 1]' returns '3'.</li>
|
||
<li>'[4, 2]' returns '6'.</li>
|
||
<li>'[-4, -2]' returns '6'.</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][12][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359697" name="[scale_team][answers_attributes][12][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][12][value]" id="radio_[scale_team][answers_attributes][12]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][12]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][12][value]" id="radio_[scale_team][answers_attributes][12]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][12]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Supremum norm</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Test the function with several different vectors. Each time, the function<br>
|
||
must return the component of the vector with the greatest value.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][13][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359698" name="[scale_team][answers_attributes][13][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][13][value]" id="radio_[scale_team][answers_attributes][13]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][13]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][13][value]" id="radio_[scale_team][answers_attributes][13]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][13]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105805">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 05 - Cosine</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n) in time and O(n) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][14][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359699" name="[scale_team][answers_attributes][14][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][14][value]" id="radio_[scale_team][answers_attributes][14]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][14]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][14][value]" id="radio_[scale_team][answers_attributes][14]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][14]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[1 0]' and '[0 1]' gives '0'</li>
|
||
<li>'[8 7]' and '[3 2]' gives '0.9914542955425437'</li>
|
||
<li>'[1 1]' and '[1 1]' gives '1'</li>
|
||
<li>'[4 2]' and '[1 1]' gives '0.9486832980505138'</li>
|
||
<li>'[-7 3]' and '[6 4]' gives '-0.5462677805469223'</li>
|
||
</ul>
|
||
|
||
<p>Since the order of the parameters doesn't matter (the function is said to be<br>
|
||
commutative), the function must return the same result if you swap them.</p>
|
||
|
||
<p>Feel free to perform more tests on your own.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][15][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359700" name="[scale_team][answers_attributes][15][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][15][value]" id="radio_[scale_team][answers_attributes][15]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][15]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][15][value]" id="radio_[scale_team][answers_attributes][15]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][15]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105806">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 06 - Cross product</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameters:</p>
|
||
|
||
<ul>
|
||
<li>'[0 0 0]' and '[0 0 0]' gives '[0 0 0]'</li>
|
||
<li>'[1 0 0]' and '[0 0 0]' gives '[0 0 0]'</li>
|
||
<li>'[1 0 0]' and '[0 1 0]' gives '[0 0 1]'</li>
|
||
<li>'[8 7 -4]' and '[3 2 1]' gives '[15 -20 -5]'</li>
|
||
<li>'[1 1 1]' and '[0 0 0]' gives '[0 0 0]'</li>
|
||
<li>'[1 1 1]' and '[1 1 1]' gives '[0 0 0]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own. When giving two vectors to<br>
|
||
the function, imagine them creating a plane. Then, the function must return<br>
|
||
a vector that is orthogonal (perpendicular) to that plane.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][16][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359701" name="[scale_team][answers_attributes][16][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][16][value]" id="radio_[scale_team][answers_attributes][16]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][16]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][16][value]" id="radio_[scale_team][answers_attributes][16]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][16]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105807">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 07 - Linear transform</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n^3) in time and O(n^2) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][17][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359702" name="[scale_team][answers_attributes][17][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][17][value]" id="radio_[scale_team][answers_attributes][17]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][17]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][17][value]" id="radio_[scale_team][answers_attributes][17]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][17]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' and any vector of dimension two. The function must always return vectors with only zeros in it.</li>
|
||
<li>'[[1, 0], [0, 1]]' and any vector of dimension two. The function must always return the same vector as given in parameter.</li>
|
||
<li>'[[1, 1], [1, 1]]' and '[4, 2]'. The function must return '[6, 6]'.</li>
|
||
<li>'[[2, 0], [0, 2]]' and '[2, 1]'. The function must return '[4, 2]'.</li>
|
||
<li>'[[0.5, 0], [0, 0.5]]' and '[4, 2]'. The function must return '[2, 1]'.</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][18][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359703" name="[scale_team][answers_attributes][18][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][18][value]" id="radio_[scale_team][answers_attributes][18]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][18]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][18][value]" id="radio_[scale_team][answers_attributes][18]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][18]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105808">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 08 - Trace</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at most O(n) in time.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][19][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359704" name="[scale_team][answers_attributes][19][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][19][value]" id="radio_[scale_team][answers_attributes][19]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][19]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][19][value]" id="radio_[scale_team][answers_attributes][19]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][19]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' returns '0'</li>
|
||
<li>'[[1, 0], [0, 1]]' returns '2'</li>
|
||
<li>'[[1, 2], [3, 4]]' returns '5'</li>
|
||
<li>'[[8, -7], [4, 2]]' returns '10'</li>
|
||
<li>'[[1, 0, 0], [0, 1, 0], [0, 0, 1]]' returns '3'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][20][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359705" name="[scale_team][answers_attributes][20][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][20][value]" id="radio_[scale_team][answers_attributes][20]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][20]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][20][value]" id="radio_[scale_team][answers_attributes][20]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][20]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105809">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 09 - Transpose</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n^2) (value assignments) in time and O(n^2) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][21][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359706" name="[scale_team][answers_attributes][21][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][21][value]" id="radio_[scale_team][answers_attributes][21]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][21]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][21][value]" id="radio_[scale_team][answers_attributes][21]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][21]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' returns '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[1, 0], [0, 1]]' returns '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[1, 2], [3, 4]]' returns '[[1, 3], [2, 4]]'</li>
|
||
<li>'[[1, 0, 0], [0, 1, 0], [0, 0, 1]]' returns '[[1, 0, 0], [0, 1, 0], [0, 0, 1]]'</li>
|
||
<li>'[[1, 2], [3, 4], [5, 6]]' returns '[[1, 3, 5], [2, 4, 6]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][22][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359707" name="[scale_team][answers_attributes][22][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][22][value]" id="radio_[scale_team][answers_attributes][22]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][22]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][22][value]" id="radio_[scale_team][answers_attributes][22]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][22]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105810">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 10 - row-echelon form</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n^3) in time and O(n^2) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][23][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359708" name="[scale_team][answers_attributes][23][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][23][value]" id="radio_[scale_team][answers_attributes][23]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][23]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][23][value]" id="radio_[scale_team][answers_attributes][23]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][23]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' gives '[[0, 0], [0, 0]]'</li>
|
||
<li>'[[1, 0], [0, 1]]' gives '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[4, 2], [2, 1]]' gives '[[1, 0.5], [0, 0]]'</li>
|
||
<li>'[[-7, 2], [4, 8]]' gives '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[1, 2], [4, 8]]' gives '[[1, 2], [0, 0]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][24][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359709" name="[scale_team][answers_attributes][24][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][24][value]" id="radio_[scale_team][answers_attributes][24]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][24]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][24][value]" id="radio_[scale_team][answers_attributes][24]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][24]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105811">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 11 - Determinant</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n^3) in time.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][25][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359710" name="[scale_team][answers_attributes][25][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][25][value]" id="radio_[scale_team][answers_attributes][25]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][25]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][25][value]" id="radio_[scale_team][answers_attributes][25]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][25]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' returns '0'</li>
|
||
<li>'[[1, 0], [0, 1]]' returns '1'</li>
|
||
<li>'[[2, 0], [0, 2]]' returns '4'</li>
|
||
<li>'[[1, 1], [1, 1]]' returns '0'</li>
|
||
<li>'[[0, 1], [1, 0]]' returns '-1'</li>
|
||
<li>'[[1, 2], [3, 4]]' returns '-2'</li>
|
||
<li>'[[-7, 5], [4, 6]]' returns '-62'</li>
|
||
<li>'[[1, 0, 0], [0, 1, 0], [0, 0, 1]]' returns '1'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][26][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359711" name="[scale_team][answers_attributes][26][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][26][value]" id="radio_[scale_team][answers_attributes][26]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][26]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][26][value]" id="radio_[scale_team][answers_attributes][26]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][26]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Explanations</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to explain:</p>
|
||
|
||
<ul>
|
||
<li>What happens when the determinant of a matrix is '0'.</li>
|
||
<li>What the determinant represents geometrically in the vector space
|
||
(ie, what happens after using the matrix for a linear transformation,
|
||
and what does the determinant describe)</li>
|
||
</ul>
|
||
|
||
<p>If they cannot explain it, the evaluation ends here.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][27][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359712" name="[scale_team][answers_attributes][27][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][27][value]" id="radio_[scale_team][answers_attributes][27]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][27]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][27][value]" id="radio_[scale_team][answers_attributes][27]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][27]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105812">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 12 - Inverse</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Complexity</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to justify the complexity of the function. It must be at<br>
|
||
most O(n^3) in time and O(n^2) in space.</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][28][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359713" name="[scale_team][answers_attributes][28][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][28][value]" id="radio_[scale_team][answers_attributes][28]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][28]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][28][value]" id="radio_[scale_team][answers_attributes][28]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][28]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[1, 0], [0, 1]]' returns '[[1, 0], [0, 1]]'</li>
|
||
<li>'[[2, 0], [0, 2]]' returns '[[0.5, 0], [0, 0.5]]'</li>
|
||
<li>'[[0.5, 0], [0, 0.5]]' returns '[[2, 0], [0, 2]]'</li>
|
||
<li>'[[0, 1], [1, 0]]' returns '[[0, 1], [1, 0]]'</li>
|
||
<li>'[[1, 2], [3, 4]]' returns '[[-2, 1], [1.5, -0.5]]'</li>
|
||
<li>'[[1, 0, 0], [0, 1, 0], [0, 0, 1]]' returns '[[1, 0, 0], [0, 1, 0], [0, 0, 1]]'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own. To check the result, you can<br>
|
||
multiply it by the matrix you gave as parameter and it must give (approximately)<br>
|
||
the identity matrix (However, avoid testing matrices that are not invertible).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][29][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359714" name="[scale_team][answers_attributes][29][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][29][value]" id="radio_[scale_team][answers_attributes][29]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][29]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][29][value]" id="radio_[scale_team][answers_attributes][29]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][29]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105813">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 13 - Rank</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Basic tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Check the behaviour of the function with the following parameter:</p>
|
||
|
||
<ul>
|
||
<li>'[[0, 0], [0, 0]]' returns '0'</li>
|
||
<li>'[[1, 0], [0, 1]]' returns '2'</li>
|
||
<li>'[[2, 0], [0, 2]]' returns '2'</li>
|
||
<li>'[[1, 1], [1, 1]]' returns '1'</li>
|
||
<li>'[[0, 1], [1, 0]]' returns '2'</li>
|
||
<li>'[[1, 2], [3, 4]]' returns '2'</li>
|
||
<li>'[[-7, 5], [4, 6]]' returns '2'</li>
|
||
<li>'[[1, 0, 0], [0, 1, 0], [0, 0, 1]]' returns '3'</li>
|
||
</ul>
|
||
|
||
<p>Feel free to perform more tests on your own</p>
|
||
|
||
<p>Check the use of forbidden mathematical functions (see the subject).</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][30][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359715" name="[scale_team][answers_attributes][30][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][30][value]" id="radio_[scale_team][answers_attributes][30]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][30]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][30][value]" id="radio_[scale_team][answers_attributes][30]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][30]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<h4 class="scale-question-name">Explanations</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Ask the student to explain what the rank of a matrix represents.</p>
|
||
|
||
<p>If they cannot explain it, the evaluation ends here. You can use the<br>
|
||
internet to check the answers.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][31][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359716" name="[scale_team][answers_attributes][31][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][31][value]" id="radio_[scale_team][answers_attributes][31]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][31]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][31][value]" id="radio_[scale_team][answers_attributes][31]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][31]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105814">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 14 - Bonus: Projection matrix</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Projection</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>Build several matrices with several FoVs (convert the value in radians before<br>
|
||
passing it to the function):</p>
|
||
|
||
<ul>
|
||
<li>100 degrees</li>
|
||
<li>70 degrees</li>
|
||
<li>40 degrees</li>
|
||
</ul>
|
||
|
||
<p>Then, test the matrices in the projection utility given in the attachements.</p>
|
||
|
||
<p>Also, try testing with several different combinations of near/far values (near<br>
|
||
must stay smaller than far) and different ratios (the default is 1).</p>
|
||
|
||
<p>A lower FoV must reduce the angle of view.</p>
|
||
|
||
<p>Changing the ratio must distort the image.</p>
|
||
|
||
<p>Different values of near and far must change the distance from the camera at<br>
|
||
which objects disappear from the screen.</p>
|
||
|
||
<p>Ask the student to explain what each component of the matrix represents.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][32][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359717" name="[scale_team][answers_attributes][32][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][32][value]" id="radio_[scale_team][answers_attributes][32]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][32]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][32][value]" id="radio_[scale_team][answers_attributes][32]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][32]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section class="scale-section-item dancer from-down" id="section-105815">
|
||
<div class="section-header">
|
||
<hr>
|
||
<h3 class="font-weight-bold mb-1">Exercise 15 - Bonus: Complex vector spaces</h3>
|
||
<p class="font-italic"></p>
|
||
</div>
|
||
<h4 class="scale-question-name">Lots of tests</h4>
|
||
<p class="scale-section-guidelines">
|
||
</p><p>For this exercise, the student must have recoded all the previous functions (except for ex14),<br>
|
||
or used the generic structure of the code, to provide the use of complex<br>
|
||
numbers as scalars. The student should be able to explain how the operations<br>
|
||
of complex numbers work (geometrically).</p>
|
||
|
||
<p>Reminder of the rules for complex numbers:</p>
|
||
|
||
<ul>
|
||
<li>'i^2 = -1'</li>
|
||
<li>'(a + bi) + (c + di) = (a + c) + (b + d)i'</li>
|
||
<li>'(a + bi) - (c + di) = (a - c) + (b - d)i'</li>
|
||
<li>'(a + bi) * (c + di) = (ac - bd) + (bc + ad)i'</li>
|
||
<li>'(a + bi) / (c + di) = ((ac + bd) + (bc - ad)i) / (c^2 + d^2)'</li>
|
||
</ul>
|
||
|
||
<p>Test every function, but with complex numbers, and check that they behave<br>
|
||
correctly. The student that has done this bonus should probably provide<br>
|
||
tests for complex numbers in his executables, and show them along with<br>
|
||
the correction for the regular exercises, if they wish to gain time.</p>
|
||
|
||
<p></p>
|
||
<div class="scale-question-answers">
|
||
<div class="form-group hidden scale_team_answer_id"><div class="col-sm-10"><input class="form-control hidden" name="[scale_team][answers_attributes][33][id]" type="hidden" id="scale_team_answer_id"></div></div>
|
||
<div class="form-group hidden scale_team_answer_question_id"><div class="col-sm-10"><input class="form-control hidden" value="359718" name="[scale_team][answers_attributes][33][question_id]" type="hidden" id="scale_team_answer_question_id"></div></div>
|
||
<div class="btn-group block">
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][33][value]" id="radio_[scale_team][answers_attributes][33]_true" type="radio" value="1">
|
||
<label class="btn btn-success checkbox-label light-bg" for="radio_[scale_team][answers_attributes][33]_true">
|
||
<span class="icon-check"></span>
|
||
Yes
|
||
</label>
|
||
<input autocomplete="off" class="checkbox-input" name="[scale_team][answers_attributes][33][value]" id="radio_[scale_team][answers_attributes][33]_false" type="radio" value="0" checked="checked">
|
||
<label class="btn btn-danger checkbox-label light-bg" for="radio_[scale_team][answers_attributes][33]_false">
|
||
<span class="icon-times"></span>
|
||
No
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<div class="col-sm-12 scale-div pb-4">
|
||
<div class="dancer from-down" id="ratings-38626">
|
||
<h3 class="font-weight-bold mb-1">Ratings</h3>
|
||
<p class="marked-title">Don’t forget to check the flag corresponding to the defense</p>
|
||
<div class="btn-group block flags-buttons" data-radio-item="flag-small">
|
||
<label class="btn btn-default btn-success label_flag_ok on-active positive" for="scale_team_flag_id_1" name="scale_team[flag_id]">
|
||
<span class="iconf-check-4"></span>
|
||
Ok
|
||
</label>
|
||
</div>
|
||
<div class="btn-group block flags-buttons" data-radio-item="flag-small">
|
||
<label class="btn btn-danger btn-default label_flag_empty_work negative on-active" for="scale_team_flag_id_2" name="scale_team[flag_id]">
|
||
<span class="iconf-iconf-folder-1"></span>
|
||
Empty work
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_incomplete_work negative on-active" for="scale_team_flag_id_3" name="scale_team[flag_id]">
|
||
<span class="iconf-file-attention"></span>
|
||
Incomplete work
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_invalid_compilation negative on-active" for="scale_team_flag_id_5" name="scale_team[flag_id]">
|
||
<span class="iconf-skull-2"></span>
|
||
Invalid compilation
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_cheat negative on-active" for="scale_team_flag_id_7" name="scale_team[flag_id]">
|
||
<span class="iconf-layers"></span>
|
||
Cheat
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_crash negative on-active" for="scale_team_flag_id_8" name="scale_team[flag_id]">
|
||
<span class="iconf-bomb"></span>
|
||
Crash
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_incomplete_group negative on-active" for="scale_team_flag_id_10" name="scale_team[flag_id]">
|
||
<span class="iconf-user-delete-2"></span>
|
||
Incomplete group
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_leaks negative on-active" for="scale_team_flag_id_12" name="scale_team[flag_id]">
|
||
<span class="iconf-blood"></span>
|
||
Leaks
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_forbidden_function negative on-active" for="scale_team_flag_id_13" name="scale_team[flag_id]">
|
||
<span class="iconf-delete-2"></span>
|
||
Forbidden function
|
||
</label>
|
||
<label class="btn btn-danger btn-default label_flag_can’t_support_/_explain_code negative on-active" for="scale_team_flag_id_14" name="scale_team[flag_id]">
|
||
<span class="iconf-bubble-attention-4"></span>
|
||
Can’t support / explain code
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="col-sm-12 scale-div">
|
||
<h3 class="font-weight-bold mb-1">Conclusion</h3>
|
||
<div class="scale-final-evaluation hidden">
|
||
<div class="form-group radio_buttons optional scale_team_flag"><label class="col-sm-2 control-label radio_buttons optional">Flag</label><div class="col-sm-10"><input type="hidden" name="scale_team[flag_id]" value=""><span class="radio"><label for="scale_team_flag_id_1"><input class="radio_buttons optional" type="radio" value="1" checked="checked" name="scale_team[flag_id]" id="scale_team_flag_id_1">Ok</label></span><span class="radio"><label for="scale_team_flag_id_3"><input class="radio_buttons optional" type="radio" value="3" name="scale_team[flag_id]" id="scale_team_flag_id_3">Incomplete work</label></span><span class="radio"><label for="scale_team_flag_id_5"><input class="radio_buttons optional" type="radio" value="5" name="scale_team[flag_id]" id="scale_team_flag_id_5">Invalid compilation</label></span><span class="radio"><label for="scale_team_flag_id_7"><input class="radio_buttons optional" type="radio" value="7" name="scale_team[flag_id]" id="scale_team_flag_id_7">Cheat</label></span><span class="radio"><label for="scale_team_flag_id_8"><input class="radio_buttons optional" type="radio" value="8" name="scale_team[flag_id]" id="scale_team_flag_id_8">Crash</label></span><span class="radio"><label for="scale_team_flag_id_10"><input class="radio_buttons optional" type="radio" value="10" name="scale_team[flag_id]" id="scale_team_flag_id_10">Incomplete group</label></span><span class="radio"><label for="scale_team_flag_id_12"><input class="radio_buttons optional" type="radio" value="12" name="scale_team[flag_id]" id="scale_team_flag_id_12">Leaks</label></span><span class="radio"><label for="scale_team_flag_id_13"><input class="radio_buttons optional" type="radio" value="13" name="scale_team[flag_id]" id="scale_team_flag_id_13">Forbidden Function</label></span><span class="radio"><label for="scale_team_flag_id_14"><input class="radio_buttons optional" type="radio" value="14" name="scale_team[flag_id]" id="scale_team_flag_id_14">Can’t support / explain code</label></span><span class="radio"><label for="scale_team_flag_id_2"><input class="radio_buttons optional" type="radio" value="2" name="scale_team[flag_id]" id="scale_team_flag_id_2">Empty work</label></span></div></div>
|
||
</div>
|
||
<div class="scale-final-comments" id="comments-38626">
|
||
<p class="marked-title">Leave a comment on this evaluation ( 2048 chars max )</p>
|
||
<textarea required="required" label="false" class="text required col-sm-12 mb-4" aria-required="true" name="scale_team[comment]" id="scale_team_comment"></textarea>
|
||
|
||
</div>
|
||
<input id="token" name="token" class="hidden" type="hidden">
|
||
</div>
|
||
<div class="scale-final-submit">
|
||
<!-- <input class="btn btn-primary btn-block font-weight-bold" data-disable-with="Finishing evaluation..." name="commit" type="submit" value="Finish evaluation"> -->
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer class="legal-mentions text-center text-muted my-4 col-sm-12 flex justify-content-center flex-column flex-sm-row"><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/33">API General Terms of Use</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/2">Declaration on the use of cookies</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/5">Privacy policy</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/6">General term of use of the site</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/9">Règlement Intérieur</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/1">Terms of use for video surveillance</a><a class="text-muted small px-4" href="https://profile.intra.42.fr/legal/terms/3">Legal notices</a></footer>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div aria-hidden="true" aria-labelledby="smartModalLabel" class="modal fade" id="smartModal" role="dialog" tabindex="-1">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">
|
||
x
|
||
</button>
|
||
<h3 id="smartModalLabel">
|
||
|
||
</h3>
|
||
</div>
|
||
<div class="modal-body">
|
||
<h4 class="note-title"></h4>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button aria-hidden="true" class="btn" data-dismiss="modal">Cancel</button>
|
||
<button class="send btn btn-primary">Send</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div aria-hidden="true" aria-labelledby="flashModalLabel" class="modal fade" id="flashModal" role="dialog" tabindex="-1">
|
||
<div class="modal-dialog modal-lg">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button aria-hidden="true" class="close" data-dismiss="modal" type="button">
|
||
x
|
||
</button>
|
||
<h3 id="flashModalLabel"></h3>
|
||
</div>
|
||
<div class="modal-body">
|
||
<h4 class="note-title">Flash modal content (raw)</h4>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button aria-hidden="true" class="btn btn-block btn-default" data-dismiss="modal">Close</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div data-cache="true" class="hide"></div>
|
||
|
||
|
||
|
||
|
||
</body></html>
|