public void Add(Arc arc)
 {
     if (!matching.HasArc(arc))
     {
         matching.Enable(arc, true);
         Node node = Graph.U(arc);
         unmatchedRedNodes.Remove((!IsRed(node)) ? Graph.V(arc) : node);
     }
 }
        /// Tries to add a specific arc to the current matching.
        /// If the arc is already present, does nothing.
        /// \param arc An arc of #Graph.
        /// \exception ArgumentException Trying to add an illegal arc.
        public void Add(Arc arc)
        {
            if (matching.HasArc(arc))
            {
                return;
            }
            matching.Enable(arc, true);
            Node u = Graph.U(arc);

            unmatchedRedNodes.Remove(IsRed(u) ? u : Graph.V(arc));
        }