franktakes / teexgraph

C++ library for large-scale network analysis and computation
GNU General Public License v3.0
24 stars 8 forks source link

Make for loops type safe #9

Closed r-barnes closed 2 years ago

r-barnes commented 3 years ago

This PR fixes some for loops so that they iterate using size_t instead of int, to match the return type of vector::size(). This would ease a transition towards having graphs with more than 2,147,483,647 elements.

In printList the min/max search is initiated by choosing the first element of the array as the initial value. This means that sentinel values are no longer needed.

Some trailing whitespace is dropped and a stronger check is made on input arguments to the main teexgraph binary.