Changeset 1be100 for src/Graph/Graph6Reader.cpp
- Timestamp:
- Apr 23, 2021, 8:51:43 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 9171d8
- Parents:
- d951a5
- git-author:
- Frederik Heber <frederik.heber@…> (03/27/21 16:54:08)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/23/21 20:51:43)
- File:
-
- 1 edited
-
src/Graph/Graph6Reader.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Graph/Graph6Reader.cpp
rd951a5 r1be100 57 57 if (*_it <126) { 58 58 //6-bit encoding 59 num_nodes = *_it-6 4;59 num_nodes = *_it-63; 60 60 } else if (*_it++ == 126) { 61 61 unsigned int packets = 3; … … 66 66 } 67 67 for(unsigned int i =0; i<packets*packet_size; ++i) { 68 unsigned char packet = (*_it++) - 6 4;68 unsigned char packet = (*_it++) - 63; 69 69 ASSERT(packet<=(1<<(packet_size+1)), 70 70 "The input is malformed. " … … 84 84 void Graph6Reader::next_edge(std::istream_iterator<unsigned char> &_it) { 85 85 unsigned int bit = 0; 86 int cur_byte = 0;87 86 while(!bit && !eos) { 88 87 if (++row==column) { … … 95 94 } 96 95 if (bit_pos<0) { 97 ASSERT((*_it >= 63) && (*_it <= 126), 96 ASSERT(_it != std::istream_iterator<unsigned char>(), 97 "Graph6Reader::next_edge() - less characters than expected in string."); 98 ASSERT((*_it >= 64) && (*_it <= 126), 98 99 "The input contains a non-printable ascii char in the matrix encoding"); 99 100 cur_byte = (*_it) - 63;
Note:
See TracChangeset
for help on using the changeset viewer.
