Skip to content

Commit 17cb4e3

Browse files
committed
Documentation.
1 parent 886cf5e commit 17cb4e3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

include/kitty/operations.hpp

+19
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,15 @@ inline TT swap_adjacent( const TT& tt, uint64_t var_index )
311311
return copy;
312312
}
313313

314+
/*! Flips a variable in a truth table
315+
316+
The function flips variable `var_index` in `tt`. The function will
317+
change `tt` in-place. If `tt` should not be changed, one can use
318+
`flip` instead.
319+
320+
\param tt Truth table
321+
\param var_index A variable
322+
*/
314323
template<typename TT>
315324
void flip_inplace( TT& tt, uint64_t var_index )
316325
{
@@ -344,6 +353,7 @@ void flip_inplace( TT& tt, uint64_t var_index )
344353
}
345354
}
346355

356+
/*! \cond PRIVATE */
347357
template<int NumVars>
348358
inline void flip_inplace( static_truth_table<NumVars, true>& tt, uint64_t var_index )
349359
{
@@ -352,7 +362,16 @@ inline void flip_inplace( static_truth_table<NumVars, true>& tt, uint64_t var_in
352362
const auto shift = 1 << var_index;
353363
tt._bits = ( ( tt._bits << shift ) & detail::projections[var_index] ) | ( ( tt._bits & detail::projections[var_index] ) >> shift );
354364
}
365+
/* \endcond */
366+
367+
/*! Flips a variable in a truth table
368+
369+
The function flips variable `var_index` in `tt`. The function will
370+
not change `tt` and return the result as a copy.
355371
372+
\param tt Truth table
373+
\param var_index A variable
374+
*/
356375
template<typename TT>
357376
inline TT flip( const TT& tt, uint64_t var_index )
358377
{

0 commit comments

Comments
 (0)