| 962 | |
| 963 | |
| 964 | int |
| 965 | ReliabilityDomain::removeCutset(int tag) |
| 966 | { |
| 967 | Cutset *theCutset = (Cutset*) theCutsetsPtr->getComponentPtr(tag); |
| 968 | |
| 969 | if (theCutset != 0) { |
| 970 | |
| 971 | // Find where cutset is located |
| 972 | int index; |
| 973 | for (index = 0; index < numCutsets; index++) { |
| 974 | if (cutsetIndex[index] == tag) |
| 975 | break; |
| 976 | } |
| 977 | |
| 978 | // Shift indices down by one |
| 979 | for (int i = index; i < numCutsets-1; i++) |
| 980 | cutsetIndex[i] = cutsetIndex[i+1]; |
| 981 | |
| 982 | // Now remove the component |
| 983 | theCutsetsPtr->removeComponent(tag); |
| 984 | numCutsets--; |
| 985 | } |
| 986 | |
| 987 | return 0; |
| 988 | } |
| 989 | |
| 990 | int |
| 991 | ReliabilityDomain::removeFilter(int tag) |
no test coverage detected