Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Small and medium teams
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
rishabh-agarwal
Programming-System-ECE-352
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
Programming-System-ECE-352
/
motion.testing
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
executable file
·
63 lines (33 loc) · 1.29 KB
master
Breadcrumbs
Programming-System-ECE-352
/
motion.testing
Copy path
Top
File metadata and controls
Code
Blame
executable file
·
63 lines (33 loc) · 1.29 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
open List;;
(* get image data *)
#use"test1.caml";; (** i1 *)
#use"test2.caml";; (** i2 *)
#use"test1b.caml";; (** i1b *)
#use"test2b.caml";; (** i2b *)
#use"test1c.caml";; (** i1c *)
#use"test2c.caml";; (** i2c *)
#use"test1d.caml";; (** i1d -- case c reversed *)
#use"test2d.caml";; (** i2d *)
(*********************** testing cases ***********************)
let tst1 = diffImRow(hd(i1),hd(i2));;
let tst2 = diffIm(i1,i2);;
let nd1 = noDiff(diffIm(i1,i2));;
let nd2 = noDiff(diffIm(i1,i1));;
let nd3 = noDiff(diffIm(i2,i1));;
let pp1 = pp_my_image(i1);;
let pp2 = pp_my_image(i2);;
let mn1 = maskneg(i1,diffIm(i1,i2));;
let mp1 = maskpos(i2,diffIm(i1,i2));;
let fnzr1 = rowmaskneg([2;2;4;5;6;2;2;2],[0;0;-1;-2;-3;0;0;0]);;
let fnzr1b = rowmaskpos([2;2;4;5;6;2;2;2],[0;0;-1;-2;-3;0;0;0]);;
let fnzr2 = rowmaskpos([2;2;4;5;6;2;2;2],[0;0;+1;+2;+3;0;0;0]);;
let fnzr2b = rowmaskneg([2;2;4;5;6;2;2;2],[0;0;+1;+2;+3;0;0;0]);;
let fnz1 = firstnonzero(maskneg(i1,diffIm(i1,i2)));;
let fnz2 = firstnonzero(maskpos(i2,diffIm(i1,i2)));;
let td1 = tuplediffint((5,4),(2,5));;
(* the bigger tests *)
let ans1 = motion(i1,i2);;
let ans2 = motion(i1b,i2b);;
let ans2c = motion(i1c,i2c);;
let ans2d = motion(i1d,i2d);;
let ans3ex = motion(i1,i1);; (* throws exception; test last *)
You can’t perform that action at this time.