static_assert(is_network_type_v<Ntk>,"Ntk is not a network type");
static_assert(has_get_constant_v<Ntk>,"Ntk does not implement the get_constant method");
static_assert(has_get_node_v<Ntk>,"Ntk does not implement the get_node method");
static_assert(has_foreach_fanin_v<Ntk>,"Ntk does not implement the foreach_fanin method");
static_assert(has_fanin_size_v<Ntk>,"Ntk does not implement the fanin_size method");
static_assert(has_compute_v<Ntk,TT>,"Ntk does not implement the compute method for TT");
assert(ntk.get_node(ntk.get_constant(false))==ntk.get_node(ntk.get_constant(true))&&"network types whose constant nodes are different are not supported");
tts.resize(num_pis+1);
autott=kitty::create<TT>(num_pis);
tts[0]=tt;
node_to_id[ntk.get_constant(false)]=0;
for(autoi=0u;i<num_pis;++i)
{
kitty::create_nth_var(tt,i);
tts[i+1]=tt;
}
}
/*! \brief Simulates a window in a network.
*
* Every node in `nodes` must have all of its fanins either in `leaves`, or in
* `nodes` and precedes it (i.e., supported and in a topological order).
*
* After simulation, `tts` contains:
* - `tts[0]` is the constant-zero truth table
* - `tts[1]` to `tts[num_pis]` are the projection functions (primary inputs)
* - `tts[num_pis + 1 + i]` is the truth table for the node `nodes[i]`
assert(node_to_id.has(f)&&node_to_id[f]<tts.size()&&"some node in `nodes` has a fanin outside of `nodes` and `leaves`, or `nodes` is not in a topological order");