// File: /workspace/github_cpp_makefile_star2_O1/panosfoto[P]NGramGraphParallel/test.cpp
// Function: main
int main(){

    // An example of graph creation:

    // Declare a splitter for the Proximity Graph (string splitter here, since we will split a text to n-grams).
    StringSplitter testStringSplitter(4);

    // Set the size of the atoms (n-grams in this  case). Default is 3.
    testStringSplitter.setAtomSize(NGRAMSIZE_DEFAULT_VALUE);

    // Declare the payload of the Proximity Graph (the entity that will be split to atoms). We are using a text in this example, so it will be a string payload.
    StringPayload testStringPayload(TEXT_PAYLOAD);

    // Declare the Proximity Graph. We will split a text into n-grams, so we are using an NGramGraph which is a ProximityGraph for this use.
    // The NGramGraph has a built-in basic Proximity Evaluator so we won't explicitly pass one, but it needs a String Splitter and a String Payload to split.
    NGramGraph testNGramGraph(nullptr, &testStringSplitter, &testStringPayload, 2);

    // Create the graph from the text (StringPayload) and print it in DOT format.
    testNGramGraph.createGraph();
    testNGramGraph.printGraphviz();
    testNGramGraph.printGraphvizToFile("out.dot");



    // -------------------------------------------------------------------------------------------
    cout << endl << endl << "-------------------------" << endl << endl << endl;



    // An example of graph comparison:

    // Declare an instance of GraphSimilarity to hold the comparison's result
    GraphSimilarity testGraphSimilarity;

    // Declare the graph comparator
    GraphComparator<std::string, std::string> testGraphComparator;

    // Compare the previous graph with itself and store the result to testGraphSimilarity
    testGraphSimilarity = testGraphComparator.compare(testNGramGraph, testNGramGraph);

    // Display the size similarity (from the various similarity components) of the two compared graphs.
    map<string, double> testSimilarityComponents =  testGraphSimilarity.getSimilarityComponents();
    cout << "Size Similarity: " << testSimilarityComponents["sizeSimilarity"] << endl;
    // Since they are the same graph, their size is equal, therefore the similarity is 1.

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x15590
movl $0x3, 0x8(%rbx)
leaq -0x60(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xf82f(%rip), %rsi      # 0x16070
leaq 0xf840(%rip), %rdx      # 0x16088
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0x6fa8
leaq -0xd8(%rbp), %rdi
movq %rbx, %rsi
callq 0x1542c
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x6871
callq 0x6290
leaq -0x198(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq -0xd8(%rbp), %rcx
xorl %esi, %esi
movl $0x2, %r8d
callq 0x13a62
leaq -0x198(%rbp), %rdi
callq 0x13b28
movq 0x1e70d(%rip), %rbx     # 0x24fb0
leaq -0x198(%rbp), %rdi
movq %rbx, %rsi
callq 0x6b6e
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xf7c8(%rip), %rsi      # 0x16089
leaq 0xf7c8(%rip), %rdx      # 0x16090
leaq -0x50(%rbp), %rdi
callq 0x6fa8
leaq -0x198(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x30, %edx
callq 0x6da4
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x68f4
callq 0x6290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq 0x1e69e(%rip), %rdi     # 0x24fb0
callq 0x6030
movq %rax, %rdi
callq 0x61e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61e0
movq %rax, %rbx
leaq 0xf73e(%rip), %rsi      # 0x16091
movl $0x19, %edx
movq %rax, %rdi
callq 0x6300
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61e0
leaq -0xf8(%rbp), %rdi
callq 0x1384c
cmpl $0x0, -0x180(%rbp)
xorps %xmm2, %xmm2
jle 0x69fb
movsd 0xf60d(%rip), %xmm2     # 0x16008
leaq -0xb0(%rbp), %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x1386c
leaq -0xb0(%rbp), %rdi
movq 0x18(%rdi), %rax
leaq -0xf8(%rbp), %rsi
movq %rax, 0x18(%rsi)
movups 0x8(%rdi), %xmm0
movups %xmm0, 0x8(%rsi)
callq 0x1388c
movq 0x1e579(%rip), %rdi     # 0x24fb0
leaq 0xf66d(%rip), %rsi      # 0x160ab
movl $0x11, %edx
callq 0x6300
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xf666(%rip), %rsi      # 0x160bd
leaq 0xf66d(%rip), %rdx      # 0x160cb
leaq -0x30(%rbp), %rdi
callq 0x6fa8
leaq -0xb0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6e86
movsd (%rax), %xmm0
movq 0x1e52e(%rip), %rdi     # 0x24fb0
callq 0x6430
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x62a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6030
movq %rax, %rdi
callq 0x61e0
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x6abf
callq 0x6290
leaq -0xb0(%rbp), %rdi
callq 0x6f06
leaq -0x198(%rbp), %rdi
callq 0x13b02
leaq -0xd8(%rbp), %rdi
callq 0x1548e
xorl %eax, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x6af3
movq %rax, %rbx
jmp 0x6b3c
jmp 0x6b4a
jmp 0x6b4a
jmp 0x6b4a
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x6b4d
callq 0x6290
jmp 0x6b4d
jmp 0x6b4a
movq %rax, %rbx
jmp 0x6b59
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r14, %rdi
je 0x6b65
callq 0x6290
jmp 0x6b65
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x6b3c
callq 0x6290
leaq -0xb0(%rbp), %rdi
callq 0x6f06
jmp 0x6b4d
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
callq 0x13b02
leaq -0xd8(%rbp), %rdi
callq 0x1548e
movq %rbx, %rdi
callq 0x6490
nop