Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lee30sonia committed Apr 18, 2024
1 parent 056df91 commit 2684518
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
34 changes: 8 additions & 26 deletions include/mockturtle/views/names_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
*/

/*!
\file names_view.hpp
\brief Implements methods to declare names for network signals
\file names_view.hpp
\brief Implements methods to declare names for network signals
\author Heinz Riener
\author Marcel Walter
\author Mathias Soeken
\author Siang-Yun (Sonia) Lee
\author Heinz Riener
\author Marcel Walter
\author Mathias Soeken
\author Siang-Yun (Sonia) Lee
*/

#pragma once
Expand Down Expand Up @@ -68,9 +68,9 @@ class names_view : public Ntk
if ( this != &named_ntk ) // Check for self-assignment
{
Ntk::operator=( named_ntk );
_signal_names = named_ntk.get_signal_names();
_signal_names = named_ntk._signal_names;
_network_name = named_ntk._network_name;
_output_names = named_ntk.get_output_names();
_output_names = named_ntk._output_names;
}
return *this;
}
Expand Down Expand Up @@ -123,15 +123,6 @@ class names_view : public Ntk
return _network_name;
}

/*! \brief Gets all signal name.
*
* \return All signal names
*/
std::map<signal, std::string> get_signal_names() const noexcept
{
return _signal_names;
}

/*! \brief Checks if a signal has a name.
*
* Note that complemented signals may have different names.
Expand Down Expand Up @@ -204,15 +195,6 @@ class names_view : public Ntk
return _output_names.at( index );
}

/*! \brief Gets all names of all outputs.
*
* \return All output names.
*/
std::map<uint32_t, std::string> get_output_names() const
{
return _output_names;
}

private:
std::string _network_name;
std::map<signal, std::string> _signal_names;
Expand Down
2 changes: 1 addition & 1 deletion test/views/names_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void test_copy_names_view()
named_ntk.set_name( c, "c" );
named_ntk.set_output_name( 0, "f" );

// test & operator= for named_ntk_empty and non-empty ntk.
// test operator= for empty and non-empty ntk.
names_view<Ntk> named_ntk_empty{};
named_ntk_empty = ntk;
CHECK( named_ntk_empty.get_network_name() == "" );
Expand Down

0 comments on commit 2684518

Please sign in to comment.