Mercurial > octave
diff libinterp/dldfcn/symrcm.cc @ 21751:b571fc85953f
maint: Use two spaces after period to indicate sentence break.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 19 May 2016 18:48:52 -0700 |
parents | aba2e6293dd8 |
children | 112b20240c87 |
line wrap: on
line diff
--- a/libinterp/dldfcn/symrcm.cc Thu May 19 19:42:57 2016 -0400 +++ b/libinterp/dldfcn/symrcm.cc Thu May 19 18:48:52 2016 -0700 @@ -79,7 +79,7 @@ // A simple queue. // Queues Q have a fixed maximum size N (rows,cols of the matrix) and are -// stored in an array. qh and qt point to queue head and tail. +// stored in an array. qh and qt point to queue head and tail. // Enqueue operation (adds a node "o" at the tail) @@ -112,7 +112,7 @@ // the parent of entry i #define PARENT(i) (((i) - 1) >> 1) // = floor(((i)-1)/2) -// Builds a min-heap (the root contains the smallest element). A is an array +// Builds a min-heap (the root contains the smallest element). A is an array // with the graph's nodes, i is a starting position, size is the length of A. static void @@ -143,7 +143,7 @@ } } -// Heap operation insert. Running time is O(log(n)) +// Heap operation insert. Running time is O(log(n)) static void H_insert (CMK_Node *H, octave_idx_type& h, const CMK_Node& o) @@ -169,7 +169,7 @@ while (i > 0); } -// Heap operation remove-min. Removes the smalles element in O(1) and +// Heap operation remove-min. Removes the smalles element in O(1) and // reorganizes the heap optionally in O(log(n)) inline static CMK_Node @@ -185,7 +185,7 @@ // Predicate (heap empty) #define H_empty(H, h) ((h) == 0) -// Helper function for the Cuthill-McKee algorithm. Tries to determine a +// Helper function for the Cuthill-McKee algorithm. Tries to determine a // pseudo-peripheral node of the graph as starting node. static octave_idx_type @@ -322,8 +322,8 @@ return x.id; } -// Calculates the node's degrees. This means counting the nonzero elements -// in the symmetric matrix' rows. This works for non-symmetric matrices +// Calculates the node's degrees. This means counting the nonzero elements +// in the symmetric matrix' rows. This works for non-symmetric matrices // as well. static octave_idx_type @@ -503,11 +503,11 @@ return ovl (P); } - // a heap for the a node's neighbors. The number of neighbors is + // a heap for the a node's neighbors. The number of neighbors is // limited by the maximum degree max_deg: OCTAVE_LOCAL_BUFFER (CMK_Node, S, max_deg); - // a queue for the BFS. The array is always one element larger than + // a queue for the BFS. The array is always one element larger than // the number of entries that are stored. OCTAVE_LOCAL_BUFFER (CMK_Node, Q, N+1); @@ -515,7 +515,7 @@ octave_idx_type c = -1; // upper bound for the bandwidth (=quality of solution) - // initialize the bandwidth of the graph with 0. B contains the + // initialize the bandwidth of the graph with 0. B contains the // the maximum of the theoretical lower limits of the subgraphs // bandwidths. octave_idx_type B = 0; @@ -538,7 +538,7 @@ v.id = find_starting_node (N, ridx, cidx, ridx2, cidx2, D, i); // mark the node as visited and enqueue it (a starting node - // for the BFS). Since the node will be a root of a spanning + // for the BFS). Since the node will be a root of a spanning // tree, its dist is 0. v.deg = D[v.id]; v.dist = 0; @@ -674,9 +674,9 @@ if (Bsub < level_N) Bsub = level_N; } - // finish of BFS. If there are still unvisited nodes in the graph - // then it is split into CCs. The computed bandwidth is the maximum - // of all subgraphs. Update: + // finish of BFS. If there are still unvisited nodes in the graph + // then it is split into CCs. The computed bandwidth is the maximum + // of all subgraphs. Update: if (Bsub > B) B = Bsub; }