Skip to content

Instantly share code, notes, and snippets.

@Hydrotoast
Last active December 27, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hydrotoast/7275852 to your computer and use it in GitHub Desktop.
Save Hydrotoast/7275852 to your computer and use it in GitHub Desktop.
template <typename T>
class Node
{
public:
Node(T data);
// mutators
void add_edge(const Node<T>* node);
// accessors
const T& data() const;
const std::vector<const Node<T>*>& edges() const;
private:
T data_;
std::vector<const Node<T>*> edges_;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment