{"action":"created","issue":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14","labels_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14/comments","events_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14/events","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14","id":59917840,"number":14,"title":"Comparison of ellipsoidal objects is done only based on relative precision, absolute precision is ignored","user":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ElenaIva","id":15038164,"avatar_url":"https://avatars.githubusercontent.com/u/15038164?v=3","gravatar_id":"","url":"https://api.github.com/users/ElenaIva","html_url":"https://github.com/ElenaIva","followers_url":"https://api.github.com/users/ElenaIva/followers","following_url":"https://api.github.com/users/ElenaIva/following{/other_user}","gists_url":"https://api.github.com/users/ElenaIva/gists{/gist_id}","starred_url":"https://api.github.com/users/ElenaIva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElenaIva/subscriptions","organizations_url":"https://api.github.com/users/ElenaIva/orgs","repos_url":"https://api.github.com/users/ElenaIva/repos","events_url":"https://api.github.com/users/ElenaIva/events{/privacy}","received_events_url":"https://api.github.com/users/ElenaIva/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/2","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/Autumn-Winter%202015","labels_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/milestones/2/labels","id":1357610,"number":2,"title":"Autumn-Winter 2015","description":"","creator":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":11,"state":"open","created_at":"2015-10-15T16:08:29Z","updated_at":"2016-01-03T20:37:36Z","due_on":"2017-12-20T21:00:00Z","closed_at":null},"comments":44,"created_at":"2015-03-05T08:00:50Z","updated_at":"2016-01-09T17:09:43Z","closed_at":null,"body":"Deadline - 28th of October, by that time all changes and tests should be merged into \"master\" branch.\r\n-----------------------------------------------------------------------------------\r\n\r\nComparison of ellipsoid objects doesn't take into account an absolute precision, see elltool.core.AGenEllipsoid.isEqualInternal:\r\n\r\nLine 31:             [~, tolerance] = ellFirstArr.getRelTol;\r\n\r\nLine 60-62:\r\n\r\n                [isEqualArr, reportStr] =...\r\n                    modgen.struct.structcomparevec(SEll1Array,...\r\n                    SEll2Array, tolerance);\r\n\r\nThis needs to be fixed by using absolute precision along with relative precision (modgen.struct.structcomparevec can actually accept both).\r\n\r\nThe first step should be writing the tests that \"capture\" this incorrect behavior. To do that study modgen.common.absrelcompare function and the way it works. The best ways to do that - study its code and the tests for the function (look at \"testAbsRelCompare\" test in modgen.common.test.mlunit.mlunit_test_common test case).\r\n\r\nOnce you understand the way absrelcompare works you can create tests by constructing ellipsoids with different precisions of calculation (this can be done via passing additional properties to \"ellipsoid\" constructor like this ellObj=ellipsoid(centVec,shapeMat,'absTol',1e-4,'relTol',1-3')) and calling isEqual to compare the constructed ellipsoid objects. The tests should be constructed in a such way that they would pass if the logic were correct. \r\nThe tests should be put into elltool.core.test.mlunit.EllipsoidTestCase. All the tests should fail.\r\n\r\nAfter that you make the fix to isEqualInternal method and make sure that all the tests start to pass. If you change the tests to make them pass - roll back the change in isEqualInternal and make sure once again that they fail prior to the change. Thus the tests should all fail prior the change and should all pass after the change.\r\n"},"comment":{"url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/comments/170260411","html_url":"https://github.com/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14#issuecomment-170260411","issue_url":"https://api.github.com/repos/SystemAnalysisDpt-CMC-MSU/ellipsoids/issues/14","id":170260411,"user":{"login":"pgagarinov","id":4868370,"avatar_url":"https://avatars.githubusercontent.com/u/4868370?v=3","gravatar_id":"","url":"https://api.github.com/users/pgagarinov","html_url":"https://github.com/pgagarinov","followers_url":"https://api.github.com/users/pgagarinov/followers","following_url":"https://api.github.com/users/pgagarinov/following{/other_user}","gists_url":"https://api.github.com/users/pgagarinov/gists{/gist_id}","starred_url":"https://api.github.com/users/pgagarinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgagarinov/subscriptions","organizations_url":"https://api.github.com/users/pgagarinov/orgs","repos_url":"https://api.github.com/users/pgagarinov/repos","events_url":"https://api.github.com/users/pgagarinov/events{/privacy}","received_events_url":"https://api.github.com/users/pgagarinov/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T17:09:43Z","updated_at":"2016-01-09T17:09:43Z","body":"The more tests - the better as long as there is no any copy-pasting. So let us have separate methods (tests) and place common code into sub functions or separate not test methods."}}