maybe i got a bug

bioinfornatics bioinfornatics at fedoraproject.org
Fri Feb 1 00:59:30 PST 2013


> Apparently I didn't understand the code. :)
>
> My comments should be generally correct: Calling front() 
> multiple times should return the same element and it should not 
> change the state of the range.
>
> Ali

My code works like you said you can call front multiple time he 
will return same thing. I check in front the lettern return to 
set or not the state and the section number. this maye should 
move to popFront.

To explain, i iterate over a fastq file with a memory mapped 
file. Then i iterate letter by letter and i need to return the 
given letter and if this letter is wich line type are. I do not 
use \n or \r\n to identify a line as fastq format allow witespace 
and newline int sequence and quality line. Each time i see a new 
identifier line i increase the counter to said at the end they 
are xxx sections in this file.
As is a memmory mapped file i read ubyte, by example 64 is @. 64 
could be a quality letter or the letter to identify indentifiers 
start.
So i need to count how many sequence letter is in this section to 
count number of quality because they are same number.

As i use a memory mapped file i won't copy my struct for able to 
loop as i do not want map the file twice that is rather a big 
problem for a big file this a perf issue. memory mapped file is 
used to read fastly a file so is a nonsense


More information about the Digitalmars-d-learn mailing list