Skip to content

Commit

Permalink
Fix Doxygen complaints about missing documentation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Oct 1, 2023
1 parent 1d0ca2f commit dab1618
Show file tree
Hide file tree
Showing 15 changed files with 760 additions and 73 deletions.
6 changes: 3 additions & 3 deletions src/adiar/bdd.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,9 @@ namespace adiar
///
/// \param f BDD to be quantified.
///
/// \param gen Generator function, that produces variables to be quantified in
/// \em descending order. When none are left to-be quantified, it
/// returns a value larger than `bdd::max_label`.
/// \param vars Generator function, that produces variables to be quantified in
/// \em descending order. When none are left to-be quantified, it
/// returns a value larger than `bdd::max_label`.
///
/// \returns \f$ \exists x_i \in \texttt{gen()} : f \f$
//////////////////////////////////////////////////////////////////////////////
Expand Down
10 changes: 9 additions & 1 deletion src/adiar/bdd/bdd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@ namespace adiar
class __bdd : public internal::__dd
{
public:
////////////////////////////////////////////////////////////////////////////
/// \brief Default constructor with an empty result.
////////////////////////////////////////////////////////////////////////////
__bdd();

////////////////////////////////////////////////////////////////////////////
/// \brief Wrapper for an algorithm's already reduced output.
////////////////////////////////////////////////////////////////////////////
__bdd(const shared_node_file_type &f);

////////////////////////////////////////////////////////////////////////////
/// \brief Wrapper for an algorithm's unreduced output.
////////////////////////////////////////////////////////////////////////////
__bdd(const shared_arc_file_type &f, const exec_policy &ep);

////////////////////////////////////////////////////////////////////////////
/// \brief Conversion constructor from a `bdd` to pass along a prior value.
////////////////////////////////////////////////////////////////////////////
__bdd(const bdd &bdd);
};
Expand Down Expand Up @@ -114,7 +122,7 @@ namespace adiar
bdd(bdd &&f);

////////////////////////////////////////////////////////////////////////////
/// \brief Implicit move conversion from a possibly to-be reduced result
/// \brief Implicit move conversion from a possibly to-be reduced result
/// from an algorithm to a `bdd`.
///
/// \details Since the `adiar::internal::reduce` algorithm is run as part of
Expand Down
32 changes: 31 additions & 1 deletion src/adiar/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,40 @@ namespace adiar
/*const*/ shared_ptr<bool> unreferenced = make_shared<bool>(true);

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Default construction for a pointer to `null`.
////////////////////////////////////////////////////////////////////////////
builder_ptr() = default;
builder_ptr(const builder_ptr&) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Copy construction.
////////////////////////////////////////////////////////////////////////////
builder_ptr(const builder_ptr &bp) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move construction.
////////////////////////////////////////////////////////////////////////////
builder_ptr(builder_ptr &&bp) = default;

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Copy construction.
////////////////////////////////////////////////////////////////////////////
builder_ptr& operator =(const builder_ptr &bp) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move construction.
////////////////////////////////////////////////////////////////////////////
builder_ptr& operator =(builder_ptr &&bp) = default;

private:
////////////////////////////////////////////////////////////////////////////
/// \brief Construction from an Adiar DD node made by a specific builder.
///
/// \param p Unique identifier of one of Adiar's nodes.
///
/// \param sp Reference (read-only) to the builder's shared information.
////////////////////////////////////////////////////////////////////////////
builder_ptr(const internal::node::uid_type &p,
const shared_ptr<const builder_shared> &sp)
: uid(p), builder_ref(sp)
Expand Down
60 changes: 58 additions & 2 deletions src/adiar/internal/data_types/arc.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,55 @@ namespace adiar::internal
pointer_type _target;

public:
// Provide 'default' constructors to ensure it being a 'POD' inside of TPIE.
////////////////////////////////////////////////////////////////////////////
/// \brief Default construction (trivial).
///
/// \details The default, copy, and move assignment has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
arc() = default;
arc(const arc&) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Copy construction (trivial).
///
/// \details The default, copy, and move assignment has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
arc(const arc &a) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move construction (trivial).
///
/// \details The default, copy, and move assignment has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
arc(arc &&a) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Destruction (trivial).
///
/// \details The destructor has to be `default` to ensure it is a *POD* and
/// hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
~arc() = default;

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Copy assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to ensure it
/// is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
arc& operator =(const arc &a) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to ensure it
/// is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
arc& operator =(arc &&a) = default;

public:
// Provide 'non-default' constructors to make it easy to use outside of TPIE.

Expand Down Expand Up @@ -112,15 +156,25 @@ namespace adiar::internal

/* ================================= FLAGS ============================== */
public:
////////////////////////////////////////////////////////////////////////////
/// \brief Obtain the outdegree index, i.e. the child number this arc is of
/// the `source` node.
////////////////////////////////////////////////////////////////////////////
pointer_type::out_idx_type out_idx() const
{ return _source.out_idx(); }

/* ============================== COMPARATORS =========================== */

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Check that both `source` and `target` match.
////////////////////////////////////////////////////////////////////////////
inline bool operator== (const arc &o) const
{ return this->_source == o._source && this->_target == o._target; }

////////////////////////////////////////////////////////////////////////////
/// \brief Check either `source` or `target` mismatch.
////////////////////////////////////////////////////////////////////////////
inline bool operator!= (const arc &o) const
{ return !(*this == o); }

Expand Down Expand Up @@ -149,6 +203,7 @@ namespace adiar::internal
//////////////////////////////////////////////////////////////////////////////
struct arc_source_lt
{
/// \copydoc arc_target_lt
bool operator ()(const arc& a, const arc& b) const {
return a.source() < b.source();
}
Expand All @@ -159,6 +214,7 @@ namespace adiar::internal
//////////////////////////////////////////////////////////////////////////////
struct arc_target_lt
{
/// \copydoc arc_target_lt
bool operator ()(const arc& a, const arc& b) const {
return a.target() < b.target()
#ifndef NDEBUG
Expand Down
60 changes: 58 additions & 2 deletions src/adiar/internal/data_types/level_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,50 @@ namespace adiar::internal
// TODO (Larger variable identifiers):
// template <typename level_type = ptr_uint64::label_type>
public:
////////////////////////////////////////////////////////////////////////////
/// \brief Type of a variable level.
////////////////////////////////////////////////////////////////////////////
using level_type = ptr_uint64::label_type;

/* ================================ VARIABLES =========================== */
private:

level_type _label;

size_t _width;

/* ============================== CONSTRUCTORS ========================== */
public:
// Provide 'default' constructors to ensure it being a 'POD' inside of TPIE.
////////////////////////////////////////////////////////////////////////////
/// \brief Default construction (trivial).
///
/// \details The default, copy, and move construction has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
level_info() = default;
level_info(const level_info &) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Copy construction (trivial).
///
/// \details The default, copy, and move construction has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
level_info(const level_info &li) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move construction (trivial).
///
/// \details The default, copy, and move construction has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
level_info(level_info &&li) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Destruction (trivial).
///
/// \details The destructor has to be `default` to ensure it is a *POD* and
/// hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
~level_info() = default;

////////////////////////////////////////////////////////////////////////////
Expand All @@ -35,6 +67,23 @@ namespace adiar::internal
: _label(label), _width(width)
{ }

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Copy assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to ensure it
/// is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
level_info& operator =(const level_info &li) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to ensure it
/// is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
level_info& operator =(level_info &&li) = default;

/* ============================ MEMBER FUNCTIONS ======================== */
public:
////////////////////////////////////////////////////////////////////////////
Expand All @@ -57,9 +106,16 @@ namespace adiar::internal

/* =============================== OPERATORS ============================ */
public:

////////////////////////////////////////////////////////////////////////////
/// \brief Whether all entries on this level match.
////////////////////////////////////////////////////////////////////////////
inline bool operator== (const level_info &o) const
{ return this->_label == o._label && this->_width == o._width; }

////////////////////////////////////////////////////////////////////////////
/// \brief Whether any entry on this level mismatches.
////////////////////////////////////////////////////////////////////////////
inline bool operator!= (const level_info &o) const
{ return !(*this == o); }

Expand Down
71 changes: 69 additions & 2 deletions src/adiar/internal/data_types/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,55 @@ namespace adiar::internal
children_type _children;

public:
// Provide 'default' constructors to ensure it being a 'POD' inside of TPIE.
////////////////////////////////////////////////////////////////////////////
/// \brief Default construction (trivial).
///
/// \details The default, copy, and move assignment has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
node() = default;
node(const node &) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Copy construction (trivial).
///
/// \details The default, copy, and move constructor has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
node(const node &n) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move construction (trivial).
///
/// \details The default, copy, and move constructor has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
node(node &&n) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Destruction (trivial).
///
/// \details The destructor has to be `default` to ensure it is a *POD* and
/// hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
~node() = default;

public:
////////////////////////////////////////////////////////////////////////////
/// \brief Copy assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to
/// ensure it is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
node& operator =(const node &n) = default;

////////////////////////////////////////////////////////////////////////////
/// \brief Move assignment (trivial).
///
/// \details The copy and move assignment has to be `default` to ensure it
/// is a *POD* and hence can be used by TPIE's files.
////////////////////////////////////////////////////////////////////////////
node& operator =(node &&n) = default;

public:
////////////////////////////////////////////////////////////////////////////
/// \brief The unique identifier of this node
Expand Down Expand Up @@ -278,28 +322,51 @@ namespace adiar::internal

/* =============================== COMPARATORS ========================== */
public:

//////////////////////////////////////////////////////////////////////////////
/// \brief Sorting of node based based on its `uid()` (i.e. its time-stamp).
/// If they are the same, then it secondly is sorted on its cildren.
//////////////////////////////////////////////////////////////////////////////
inline bool operator< (const node &o) const
{
return (this->_uid < o._uid)
|| (this->_uid == o._uid && this->_children < o._children);
}

//////////////////////////////////////////////////////////////////////////////
/// \brief Sorting of node based based on its `uid()` (i.e. its time-stamp).
/// If they are the same, then it secondly is sorted on its cildren.
//////////////////////////////////////////////////////////////////////////////
inline bool operator> (const node &o) const
{ return (o < *this); }

//////////////////////////////////////////////////////////////////////////////
/// \brief Check uid and children match.
//////////////////////////////////////////////////////////////////////////////
inline bool operator== (const node &o) const
{
return this->_uid == o._uid
&& this->_children[false] == o._children[false]
&& this->_children[true] == o._children[true];
}

//////////////////////////////////////////////////////////////////////////////
/// \brief Check either uid or one of the children mismatch.
//////////////////////////////////////////////////////////////////////////////
inline bool operator!= (const node &o) const
{ return !(*this == o); }

//////////////////////////////////////////////////////////////////////////////
/// \brief Sorting of node based based on its `uid()` (i.e. its time-stamp).
/// If they are the same, then it secondly is sorted on its cildren.
//////////////////////////////////////////////////////////////////////////////
inline bool operator<= (const node &o) const
{ return (*this < o) || (*this == o); }

//////////////////////////////////////////////////////////////////////////////
/// \brief Sorting of node based based on its `uid()` (i.e. its time-stamp).
/// If they are the same, then it secondly is sorted on its cildren.
//////////////////////////////////////////////////////////////////////////////
inline bool operator>= (const node &o) const
{ return (*this > o) || (*this == o); }

Expand Down
Loading

0 comments on commit dab1618

Please sign in to comment.