• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / automatalib / 13815628111

12 Mar 2025 03:46PM CUT coverage: 92.058% (-0.001%) from 92.059%
13815628111

push

github

mtf90
cleanup redundant type variable definitions

1 of 1 new or added line in 1 file covered. (100.0%)

16599 of 18031 relevant lines covered (92.06%)

1.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/api/src/main/java/net/automatalib/graph/ShrinkableGraph.java
1
/* Copyright (C) 2013-2025 TU Dortmund University
2
 * This file is part of AutomataLib <https://automatalib.net>.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package net.automatalib.graph;
17

18
import org.checkerframework.checker.nullness.qual.Nullable;
19

20
/**
21
 * A graph that supports (desirably efficient) removal of nodes and edges.
22
 *
23
 * @param <N>
24
 *         node class
25
 * @param <E>
26
 *         edge class
27
 */
28
public interface ShrinkableGraph<N, E> extends Graph<N, E> {
29

30
    /**
31
     * Removes a node from this graph. All incoming and outgoing edges are removed as well.
32
     *
33
     * @param node
34
     *         the node to remove.
35
     */
36
    default void removeNode(N node) {
37
        removeNode(node, null);
×
38
    }
×
39

40
    /**
41
     * Removes a node from this graph, and redirects all incoming edges to the given replacement node (node that
42
     * outgoing edges are still removed). If a {@code null} replacement is specified, then this function behaves
43
     * equivalently to the above {@link #removeNode(Object)}.
44
     *
45
     * @param node
46
     *         the node to remove
47
     * @param replacement
48
     *         the replacement node for incoming edges
49
     */
50
    void removeNode(N node, @Nullable N replacement);
51

52
    /**
53
     * Removes an outgoing edge from the given node.
54
     *
55
     * @param node
56
     *         the node
57
     * @param edge
58
     *         the edge to remove
59
     */
60
    void removeEdge(N node, E edge);
61
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc