Skip to content

Commit

Permalink
🎨 use the previous version for the evaluate_output function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drewniok committed Jan 9, 2025
1 parent 8d9aff1 commit 7fabad9
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions include/fiction/utils/truth_table_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,12 @@ namespace fiction
*
* @param truth_tables The truth tables to evaluate.
* @param current_input_index The index representing the current input pattern.
* @return A `std::optional<uint64_t>` containing the output of the truth tables if the number of
* truth tables does not exceed 64; or `std::nullopt` if the number of truth tables exceeds 64.
* @return Output of the truth tables.
*/
[[nodiscard]] inline std::optional<uint64_t>
evaluate_output(const std::vector<kitty::dynamic_truth_table>& truth_tables,
const uint64_t current_input_index) noexcept
[[nodiscard]] inline uint64_t evaluate_output(const std::vector<kitty::dynamic_truth_table>& truth_tables,
const uint64_t current_input_index) noexcept
{
if (truth_tables.size() > 64)
{
return std::nullopt; // Indicate an error
}
assert(truth_tables.size() <= 64 && "Number of truth tables exceeds 64");

std::bitset<64> bits{};
for (auto i = 0u; i < truth_tables.size(); i++)
Expand Down

0 comments on commit 7fabad9

Please sign in to comment.