cplib-cpp

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub hitonanode/cplib-cpp

:warning: マトロイドクラスのインターフェースの説明
(combinatorial_opt/matroids/matroid_example.hpp)

本リポジトリで一般的なマトロイドに対して適用されるアルゴリズムは,以下のようなメソッドを持つマトロイドクラスを前提に動作する.

Code

#pragma once
#include <vector>

struct MatroidExample {
    using Element = int;

    int size() const; // # of elements of set we consider

    // If I is NOT independent or e \in I, undefined.
    // If I is independent and I + {e} is not, return elements of the circuit.
    // If I + {e} is also independent, return empty vector.
    template <class State = std::vector<bool>> void set(State I);
    std::vector<Element> circuit(Element e) const;
};
#line 2 "combinatorial_opt/matroids/matroid_example.hpp"
#include <vector>

struct MatroidExample {
    using Element = int;

    int size() const; // # of elements of set we consider

    // If I is NOT independent or e \in I, undefined.
    // If I is independent and I + {e} is not, return elements of the circuit.
    // If I + {e} is also independent, return empty vector.
    template <class State = std::vector<bool>> void set(State I);
    std::vector<Element> circuit(Element e) const;
};
Back to top page