void p2t_sweepcontext_destroy (P2tSweepContext* THIS) { GList* iter; guint i; /* Clean up memory */ p2t_point_free (THIS->head_); p2t_point_free (THIS->tail_); p2t_advancingfront_free (THIS->front_); p2t_node_free (THIS->af_head_); p2t_node_free (THIS->af_middle_); p2t_node_free (THIS->af_tail_); g_ptr_array_free (THIS->points_, TRUE); g_ptr_array_free (THIS->triangles_, TRUE); for (iter = g_list_first (THIS->map_); iter != NULL; iter = g_list_next (iter)) { P2tTriangle* ptr = triangle_val (iter); g_free (ptr); } g_list_free (THIS->map_); for (i = 0; i < THIS->edge_list->len; i++) { p2t_edge_free (edge_index (THIS->edge_list, i)); } g_ptr_array_free (THIS->edge_list, TRUE); }
/// Accessor for edges, uses index operator. value_type operator[](edge e) const { return m[edge_index(e)]; }
/// Accessor for edges. This method provides read only access /// to the matrix and is not boundary checked. /// /// Complexity: O(1) value_type at(edge e) const { return m[edge_index(e)]; }
/// Accessor for edges, uses index operator. value_type & operator[](edge e) { return m[edge_index(e)]; }
/// \{ /// Accessor for edges. This method provides writing access to /// the matrix and is not boundary checked. /// /// \note The call 'at(e)=edge_value' is the same as 'add(e)'. /// /// Complexity: O(1) value_type & at(edge e) { return m[edge_index(e)]; }