public void add(terminal_t term, int net_other, bool sorted) { if (sorted) { for (int i = 0; i < m_connected_net_idx.size(); i++) { if (m_connected_net_idx[i] > net_other) { m_terms.Insert(i, term); //plib::container::insert_at(m_terms, i, term); m_connected_net_idx.Insert(i, net_other); //plib::container::insert_at(m_connected_net_idx, i, net_other); m_gt.Insert(i, 0.0); //plib::container::insert_at(m_gt, i, 0.0); m_go.Insert(i, 0.0); //plib::container::insert_at(m_go, i, 0.0); m_Idr.Insert(i, 0.0); //plib::container::insert_at(m_Idr, i, 0.0); m_connected_net_V.Insert(i, null); //plib::container::insert_at(m_connected_net_V, i, null); return; } } } m_terms.push_back(term); m_connected_net_idx.push_back(net_other); m_gt.push_back(0.0); m_go.push_back(0.0); m_Idr.push_back(0.0); m_connected_net_V.push_back(null); }
//constexpr std::size_t capacity() const noexcept { return m_list.capacity() - 1; } //constexpr bool empty() const noexcept { return (m_end == &m_list[1]); } public void push(pqentry_t <detail.net_t, netlist_time> e) { /* Lock */ lock (m_lock) //lock_guard_type lck(m_lock); { int iIdx = m_endIdx; //T * i(m_end); for (; pqentry_t <detail.net_t, netlist_time> .QueueOp.less(m_list[iIdx - 1], e); --iIdx) //for (; QueueOp::less(*(i - 1), e); --i) { // handled in the insert below //*(i) = std::move(*(i-1)); //throw new emu_unimplemented(); #if false m_prof_sortmove.inc(); #endif } m_list.Insert(iIdx, e); //*i = std::move(e); ++m_endIdx; //throw new emu_unimplemented(); #if false m_prof_call.inc(); #endif } }