Skip to content

Bug Fix in Example Code: Added Type declarations #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ignore Mac DS_Store files in all directories
.DS_Store


#Ignore EAGLE board and schematic auto save files (.b#x and .s#x) in all directories
*.b#?
*.s#?


#Development file for making local changes to Arduino libraries
#Ignore in all directories
.development
14 changes: 12 additions & 2 deletions examples/QuickSortFloat/QuickSortFloat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Copyright (c) 2017 Luis Llamas
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

UPDATES:
2020/08/22:1006>
error fix: Added type to templated declaration (Orlando S. Hoilett)
Also print values before ordering to compare (Orlando S. Hoilett)
****************************************************/

#include "QuickSortLib.h"
Expand All @@ -25,9 +30,14 @@ void setup()
{
Serial.begin(115200);

Serial.println("Antes de ordenando");
printArray(values100, values100Length);
Serial.println();
Serial.println();

Serial.println("Ordenando 100 integers");
unsigned long timeCount = micros();
QuickSort::SortAscending(values100, 0, values100Length - 1);
QuickSort<float>::SortAscending(values100, 0, values100Length - 1);
timeCount = micros() - timeCount;
printArray(values100, values100Length);
Serial.println();
Expand All @@ -38,4 +48,4 @@ void setup()

void loop()
{
}
}
14 changes: 12 additions & 2 deletions examples/QuickSortInt/QuickSortInt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Copyright (c) 2017 Luis Llamas
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

UPDATES:
2020/08/22:1006>
error fix: Added type to templated declaration (Orlando S. Hoilett)
Also print values before ordering to compare (Orlando S. Hoilett)
****************************************************/

#include "QuickSortLib.h"
Expand All @@ -25,9 +30,14 @@ void setup()
{
Serial.begin(115200);

Serial.println("Antes de ordenando");
printArray(values100, values100Length);
Serial.println();
Serial.println();

Serial.println("Ordenando 100 integers");
unsigned long timeCount = micros();
QuickSort::SortAscending(values100, 0, values100Length - 1);
QuickSort<int>::SortAscending(values100, 0, values100Length - 1);
timeCount = micros() - timeCount;
printArray(values100, values100Length);
Serial.println();
Expand All @@ -38,4 +48,4 @@ void setup()

void loop()
{
}
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=QuickSortLib
version=1.2.0
version=1.2.1
author=Luis Llamas
maintainer=Luis Llamas
sentence=QuickSort Library
Expand Down