Skip to content

Reading file could ignore \n when reading txt file #3

Description

@albertiniufu

It seems the program is treating \n as a symbol.
See
echo -n "GA" > dataset/2chars.txt
echo "GA" > dataset/example2.txt

./main -l -s -f dataset/2chars.txt
d = 1
N = 2 bytes
sizeof(int) = 4 bytes

SACAK_LYNDON 9n (linear)

TOTAL:
CLOCK = 0.000024 TIME = 0.000000
0.000024
OUTPUT:
dataset/2chars.txt.pos

Max(LA[0]): 1
Avg(LA[i]): 1.00

Number of Lyndon factors: 2
Average length: 1.00
Maximum length: 1

malloc_count ### exiting, total: 27861, peak: 21208, current: 1024
21208

d = 1
N = 3 bytes
sizeof(int) = 4 bytes

SACAK_LYNDON 9n (linear)

TOTAL:
CLOCK = 0.000032 TIME = 0.000000
0.000032
OUTPUT:
dataset/example2.txt.pos

Max(LA[0]): 1
Avg(LA[i]): 1.00

Number of Lyndon factors: 3
Average length: 1.00
Maximum length: 1

malloc_count ### exiting, total: 27871, peak: 21208, current: 1024
21208

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions