-
Notifications
You must be signed in to change notification settings - Fork 73
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
25d54f5
commit f7ff071
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 GetNumClustersViolatingUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetNumClustersViolatingUCC(); | ||
} | ||
|
||
[[nodiscard]] size_t GetNumRowsViolatingUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetNumRowsViolatingUCC(); | ||
} | ||
|
||
[[nodiscard]] std::vector<model::PLI::Cluster> GetClustersViolatingUCC() const { | ||
return GetAlgorithm<algos::UCCVerifier>(algorithm_).GetClustersViolatingUCC(); | ||
} | ||
}; | ||
|
||
} // namespace python_bindings |