-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement python bindings for UCCVerifier
Co-authored-by: Ivan Volgushev <[email protected]> Co-authored-by: Artem Demchenko <[email protected]>
- Loading branch information
1 parent
3d03c50
commit 9eff38e
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include "algorithms/ucc/ucc_verifier/ucc_verifier.h" | ||
#include "get_algorithm.h" | ||
#include "py_algorithm.h" | ||
|
||
namespace python_bindings { | ||
|
||
class PyUCCVerifier : public PyAlgorithm<algos::UCCVerifier, PyAlgorithmBase> { | ||
using PyAlgorithmBase::algorithm_; | ||
|
||
public: | ||
[[nodiscard]] bool UCCHolds() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).UCCHolds(); | ||
} | ||
|
||
[[nodiscard]] size_t GetNumClustersNotUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetNumClustersNotUCC(); | ||
} | ||
|
||
[[nodiscard]] size_t GetNumRowsNotUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetNumRowsNotUCC(); | ||
} | ||
|
||
[[nodiscard]] std::vector<model::PLI::Cluster> GetClustersNotUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetClustersNotUCC(); | ||
} | ||
}; | ||
|
||
} // namespace python_bindings |