ue 1) {= (rightBound + leftBound)/2; (arr [middle]
} (counter = 0; counter <= rightBound; counter + +) {(arr [counter] == value) counter;
} -1;
} openFile (string fileName, char mode) {filePointer; (mode) {'i': filePointer.open (fileName, ios_base :: in); break; 'o': filePointer.open (fileName, ios_base :: out); break; 'a': filePointer.open ( fileName, ios_base :: app); break;
} filePointer;
} removeNode (DirectedGraph * node, DirectedGraph * & firstNode) {((node-> previousArc! = NULL) && (node-> nextArc! = NULL)) {> ; previousArc-> nextArc = node-> nextArc;> nextArc-> previousArc = node-> previousArc;
} else if ((node-> previousArc == NULL) && (node-> nextArc! = NULL)) {> nextArc-> previousArc = NULL; = node -> nextArc;
} else if ((node-> previousArc! = NULL) && (node-> nextArc == NULL)) {> previousArc-> nextArc = NULL; p>
} else if ((node-> previousArc == NULL) && (node-> nextArc == NULL)) {= NULL;
} node;
} saveGraph (string fileName, DirectedGraph * firstNode, int NUM_VERTEX) {fileExists (string fileName); printNeiborhoodsList (DirectedGraph * firstNode, ostream * stream, int NUM_VERTEX, bool saveMode, string title = "" ;); openFile (string fileName, char mode); (fileExists ("graphs /" + fileName + ". txt")) return false; file; = openFile ("graphs /" + fileName + " . txt ", 'o'); (firstNode, & file, NUM_VERTEX, true); true;
} removeAdjacentVertex (DirectedGraph * & firstArc, int NUM_VERTEX, int vertexId, int vertexLevel) {* currentNode, * nodePointer, * sidePointer; counter, currentId, * adjacentVertex, * newVertexId, NOT_FOUND = -1 ; noOneBefore; removeNode (DirectedGraph * node, DirectedGraph * & firstNode); foundInArray (int value, int * arr, int rightBound); = firstArc; ((currentNode! = NULL) && (currentNode-> oneArc. outVertexId! = vertexId)) = currentNode-> nextArc; = 1; = new int [vertexLevel]; [0] = currentNode-> oneArc.inVertexId;> oneArc.inVertexId = 0; = currentNode-> nextArc; ((currentNode! = NULL) && (currentNode-> oneArc. outVertexId == vertexId)) {[counter] = currentNode-> oneArc.inVertexId; = currentNode; = currentNode-> nextArc; (nodePointer, firstArc); + +;
} = firstArc; (currentNode! = NULL) {= currentNode-> oneArc.outVertexId; (foundInArray (currentId, adjacentVertex, vertexLevel-1)! = NOT_FOUND) {((currentNode! = NULL ) && (currentNode-> oneArc.outVertexId == currentId)) {= currentNode; = currentNode-> nextArc; (nodePointer, firstArc);
};
} ((currentNode! = NULL) && (currentNode-...