T calc_literal_polarity()

in include/poac/core/sat.hpp [45:55]


    T calc_literal_polarity(const TwoDim<OneDim<T>>& rng, const U& i) {
        T acc = 0;
        for (const auto& rn : rng) {
            for (const auto& r : rn) {
                if (std::abs(r) == i) {
                    r > 0 ? ++acc : --acc;
                }
            }
        }
        return acc;
    }