Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2023 Fall Homework 4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSCE 310
2023 Fall Homework 4
Commits
154e6bc5
Commit
154e6bc5
authored
1 year ago
by
Brady James Garvin
Browse files
Options
Downloads
Patches
Plain Diff
Fixed wrong oracles and a missing helper function in the periodic-signal code.
parent
e3b7a791
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
homework-4/src/signal.js
+14
-0
14 additions, 0 deletions
homework-4/src/signal.js
homework-4/src/signal.test.js
+170
-170
170 additions, 170 deletions
homework-4/src/signal.test.js
with
184 additions
and
170 deletions
homework-4/src/signal.js
+
14
−
0
View file @
154e6bc5
/* IMPORTANT: Remove this directive when you start working on the code so that
* the linter will warn you about code style issues. */
/* eslint-disable no-unused-vars */
export
const
UNKNOWN
=
'
UNKNOWN
'
;
export
const
UNKNOWN
=
'
UNKNOWN
'
;
export
const
INCONSISTENT
=
'
INCONSISTENT
'
;
export
const
INCONSISTENT
=
'
INCONSISTENT
'
;
function
join
(
leftPeriod
,
rightPeriod
)
{
if
(
leftPeriod
===
UNKNOWN
)
{
return
rightPeriod
;
}
if
(
rightPeriod
===
UNKNOWN
||
rightPeriod
===
leftPeriod
)
{
return
leftPeriod
;
}
return
INCONSISTENT
;
}
class
MonoidElement
{
class
MonoidElement
{
constructor
()
{
constructor
()
{
this
.
period
=
UNKNOWN
;
// Implement this constructor per the assignment instructions.
this
.
period
=
UNKNOWN
;
// Implement this constructor per the assignment instructions.
...
...
This diff is collapsed.
Click to expand it.
homework-4/src/signal.test.js
+
170
−
170
View file @
154e6bc5
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment