1#ifndef _KITTY_CONSTRUCT_TT_H_
2#define _KITTY_CONSTRUCT_TT_H_
36 assert( tt.num_vars() == num_vars );
44 return dynamic_truth_table( num_vars );
57 if ( tt.num_vars() <= 6 )
60 tt._bits[0] =
complement ?
~detail::projections[var_index] : detail::projections[var_index];
69 std::fill( std::begin( tt._bits ), std::end( tt._bits ),
complement ? ~detail::projections[var_index] : detail::projections[var_index] );
73 const auto c = 1 << ( var_index - 6 );
74 const auto zero = uint64_t( 0 );
75 const auto one = ~zero;
76 auto block = uint64_t( 0u );
78 while ( block < tt.num_blocks() )
80 for (
auto i = 0; i < c; ++i )
84 for (
auto i = 0; i < c; ++i )
ABC_NAMESPACE_HEADER_START typedef unsigned char uint8_t
#define ABC_NAMESPACE_CXX_HEADER_START
#define ABC_NAMESPACE_CXX_HEADER_END
pcover complement(pcube *T)
void create_nth_var(TT &tt, uint8_t var_index, bool complement=false)
Constructs projections (single-variable functions)
TT create(unsigned num_vars)
Creates truth table with number of variables.