-
Notifications
You must be signed in to change notification settings - Fork 57
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
Clang and warnings fixes #88
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
70e22d1
Add explicit definition of copy constructor and others.
iglesias 9443cfe
Destructor was still missing and copy assignment defaultable -> Rule …
iglesias 211e349
Address compilation warnings about deprecated comma in subscripting.
iglesias 9d1de4e
Remove unused code in Barnes-Hut-SNE from clang-check.
iglesias 4aa66f2
Add #includes.
iglesias 4db78c4
Delete file.
iglesias b5ca911
Add methods traits include.
iglesias 1bb3e7c
Address clang-check's red herring can't initialize int with const char*.
iglesias f80a18d
Add std include.
iglesias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
*/ | ||
#pragma once | ||
|
||
#include <tapkee/defines/types.hpp> | ||
|
||
#include <memory> | ||
|
||
namespace tapkee | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,10 @@ | |
*/ | ||
#pragma once | ||
|
||
#include <tapkee/defines/methods.hpp> | ||
|
||
#include <string> | ||
|
||
namespace tapkee | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,15 +144,15 @@ TEST(Interface, ParametersSet) | |
{ | ||
int td = 3; | ||
int k = 5; | ||
tapkee::ParametersSet pg = tapkee::kwargs[target_dimension = td, num_neighbors = k]; | ||
tapkee::ParametersSet pg = tapkee::kwargs[(target_dimension = td, num_neighbors = k)]; | ||
ASSERT_EQ(static_cast<int>(pg[target_dimension]), td); | ||
ASSERT_EQ(static_cast<int>(pg[num_neighbors]), k); | ||
} | ||
|
||
TEST(Interface, OneParameterParametersSet) | ||
{ | ||
int td = 3; | ||
tapkee::ParametersSet pg = tapkee::kwargs[target_dimension = td]; | ||
tapkee::ParametersSet pg = tapkee::kwargs[(target_dimension = td)]; | ||
ASSERT_EQ(static_cast<int>(pg[target_dimension]), td); | ||
} | ||
|
||
|
@@ -168,7 +168,7 @@ TEST(Interface, WrongParameterValueKernelLocallyLinearEmbedding) | |
TapkeeOutput output; | ||
// fails with wrong parameter type as '-1' is not a valid value. | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, | ||
tapkee::kwargs[method = KernelLocallyLinearEmbedding, num_neighbors = -3]), | ||
tapkee::kwargs[(method = KernelLocallyLinearEmbedding, num_neighbors = -3)]), | ||
wrong_parameter_error); | ||
} | ||
|
||
|
@@ -206,7 +206,7 @@ TEST(Interface, CancellationPassThru) | |
TapkeeOutput output; | ||
// should cancel | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, | ||
tapkee::kwargs[method = PassThru, cancel_function = always_cancel]), | ||
tapkee::kwargs[(method = PassThru, cancel_function = always_cancel)]), | ||
cancelled_exception); | ||
} | ||
|
||
|
@@ -220,7 +220,7 @@ TEST(Interface, NoReductionMethodSetFailPassThru) | |
|
||
TapkeeOutput output; | ||
// should fail with missed parameter | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, tapkee::kwargs[eigen_method = Dense]), | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, tapkee::kwargs[(eigen_method = Dense)]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as in the other comment in this one. |
||
missed_parameter_error); | ||
} | ||
|
||
|
@@ -236,7 +236,7 @@ TEST(Interface, UnsupportedRandomizedForGeneralizedLE) | |
|
||
TapkeeOutput output; | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, | ||
tapkee::kwargs[method = LaplacianEigenmaps, eigen_method = Randomized]), | ||
tapkee::kwargs[(method = LaplacianEigenmaps, eigen_method = Randomized)]), | ||
unsupported_method_error); | ||
} | ||
|
||
|
@@ -253,7 +253,7 @@ TEST(Interface, EigenDecompositionFailMDS) | |
|
||
TapkeeOutput output; | ||
ASSERT_THROW(output = tapkee::embed(data.begin(), data.end(), kcb, dcb, fcb, | ||
tapkee::kwargs[method = MultidimensionalScaling, eigen_method = Randomized]), | ||
tapkee::kwargs[(method = MultidimensionalScaling, eigen_method = Randomized)]), | ||
eigendecomposition_error); | ||
} | ||
|
||
|
@@ -271,6 +271,6 @@ TEST(Interface, NotEnoughMemoryMDS) | |
tapkee::TapkeeOutput output; | ||
// tries to form 10000000 x 10000000 matrix (won't work on any machine in 2013) | ||
ASSERT_THROW(output = embed(data.begin(), data.end(), kcb, dcb, fcb, | ||
tapkee::kwargs[method = MultidimensionalScaling, eigen_method = Dense]), | ||
tapkee::kwargs[(method = MultidimensionalScaling, eigen_method = Dense)]), | ||
not_enough_memory_error); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oeps, I think I overlooked when changing this one ':-) without parentheses there should still be no warning in this one. I will modify it back.