// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x198, %rsp            # imm = 0x198
leaq -0xb8(%rbp), %rbx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x16bb8
movl $0x3, 0x8(%rbx)
leaq 0x10928(%rip), %rsi     # 0x18070
leaq -0xa8(%rbp), %rdi
leaq -0x1a0(%rbp), %rdx
callq 0x7110
leaq -0xe0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x16ace
leaq -0xa8(%rbp), %rdi
callq 0x7160
leaq -0x1a0(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
pushq $0x2
popq %r8
xorl %esi, %esi
callq 0x14c54
leaq -0x1a0(%rbp), %rdi
callq 0x14cd2
movq 0x2480b(%rip), %rsi     # 0x2bfb8
leaq -0x1a0(%rbp), %rdi
callq 0x7970
leaq 0x108c9(%rip), %rsi     # 0x18089
leaq -0x88(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x7110
leaq -0x1a0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
pushq $0x30
popq %rdx
callq 0x7b04
leaq -0x88(%rbp), %rdi
callq 0x7160
movq 0x247bf(%rip), %rdi     # 0x2bfb8
callq 0x7170
movq %rax, %rdi
callq 0x7170
leaq 0x10884(%rip), %rsi     # 0x18091
movq %rax, %rdi
callq 0x72e0
movq %rax, %rdi
callq 0x7170
movq %rax, %rdi
callq 0x7170
movq %rax, %rdi
callq 0x7170
leaq -0x100(%rbp), %rdi
callq 0x14ab0
leaq 0x23e40(%rip), %rax     # 0x2b680
leaq -0x68(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x60(%rbp), %rdi
leaq -0x1a0(%rbp), %rcx
movq %rcx, %rdx
callq 0x7b90
leaq -0x60(%rbp), %rdi
movq 0x18(%rdi), %rax
leaq -0x100(%rbp), %rsi
movq %rax, 0x18(%rsi)
movups 0x8(%rdi), %xmm0
movups %xmm0, 0x8(%rsi)
callq 0x14aec
movq 0x24737(%rip), %rdi     # 0x2bfb8
leaq 0x10823(%rip), %rsi     # 0x180ab
callq 0x72e0
movq %rax, %rbx
leaq 0x10826(%rip), %rsi     # 0x180bd
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x7110
leaq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7bd4
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x7470
movq %rax, %rdi
callq 0x7170
leaq -0x30(%rbp), %rdi
callq 0x7160
leaq -0x60(%rbp), %rdi
callq 0x7c44
leaq -0x1a0(%rbp), %rdi
callq 0x14cac
leaq -0xe0(%rbp), %rdi
callq 0x16b14
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %rbp
retq
jmp 0x78fd
movq %rax, %rbx
jmp 0x7942
jmp 0x794d
jmp 0x794d
jmp 0x794d
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x7160
jmp 0x7950
jmp 0x794d
movq %rax, %rbx
jmp 0x795c
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x7160
jmp 0x7968
movq %rax, %rbx
jmp 0x7968
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x7160
leaq -0x60(%rbp), %rdi
callq 0x7c44
jmp 0x7950
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x14cac
leaq -0xe0(%rbp), %rdi
callq 0x16b14
movq %rbx, %rdi
callq 0x74d0