Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COMP290 Benchmarking Examples
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Falmouth Computing
Example Solutions
COMP290 Benchmarking Examples
Compare revisions
29e884c38e347dbc43b6c8cf2d776f9b632dd5d6 to 139337b52c71abbbd22d1517c5fa2d95aed407e8
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
fal/code-samples/comp290
Select target project
No results found
139337b52c71abbbd22d1517c5fa2d95aed407e8
Select Git revision
Swap
Target
fal/code-samples/comp290
Select target project
fal/code-samples/comp290
1 result
29e884c38e347dbc43b6c8cf2d776f9b632dd5d6
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
mark partial shuffle as possibly unused
· 065539ab
Joseph Walton-Rivers
authored
2 years ago
065539ab
Merge remote-tracking branch 'origin/main'
· 139337b5
Joseph Walton-Rivers
authored
2 years ago
139337b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/labs/sorting/lab1.hpp
+1
-1
1 addition, 1 deletion
include/labs/sorting/lab1.hpp
labs/sorting/lab1.cpp
+1
-1
1 addition, 1 deletion
labs/sorting/lab1.cpp
with
2 additions
and
2 deletions
include/labs/sorting/lab1.hpp
View file @
139337b5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
std
::
vector
<
unsigned
int
>
generate_list
(
unsigned
int
count
,
bool
shuffle
=
true
,
bool
reverse
=
false
);
std
::
vector
<
unsigned
int
>
generate_list
(
unsigned
int
count
,
bool
shuffle
=
true
,
bool
reverse
=
false
);
void
partial_shuffle
(
std
::
vector
<
unsigned
int
>&
input
,
unsigned
int
swapsToPerform
);
[[
maybe_unused
]]
void
partial_shuffle
(
std
::
vector
<
unsigned
int
>&
input
,
unsigned
int
swapsToPerform
);
template
<
typename
Iterator
>
template
<
typename
Iterator
>
bool
in_order
(
const
Iterator
begin
,
const
Iterator
end
)
{
bool
in_order
(
const
Iterator
begin
,
const
Iterator
end
)
{
...
...
This diff is collapsed.
Click to expand it.
labs/sorting/lab1.cpp
View file @
139337b5
...
@@ -35,6 +35,7 @@ static void lab_swap(std::vector<unsigned int>& inputs, unsigned int idx1, unsig
...
@@ -35,6 +35,7 @@ static void lab_swap(std::vector<unsigned int>& inputs, unsigned int idx1, unsig
}
}
// used for part 2
// used for part 2
[[
maybe_unused
]]
void
partial_shuffle
(
std
::
vector
<
unsigned
int
>&
input
,
unsigned
int
swaps
)
{
void
partial_shuffle
(
std
::
vector
<
unsigned
int
>&
input
,
unsigned
int
swaps
)
{
std
::
default_random_engine
rnd
;
std
::
default_random_engine
rnd
;
...
@@ -47,7 +48,6 @@ void partial_shuffle(std::vector<unsigned int>& input, unsigned int swaps) {
...
@@ -47,7 +48,6 @@ void partial_shuffle(std::vector<unsigned int>& input, unsigned int swaps) {
}
}
}
}
void
bubble_sort
(
std
::
vector
<
unsigned
int
>&
inputs
)
{
void
bubble_sort
(
std
::
vector
<
unsigned
int
>&
inputs
)
{
// TODO write bubble sort here
// TODO write bubble sort here
}
}
...
...
This diff is collapsed.
Click to expand it.