// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once
#pragma warning(disable : 4996)

#include "targetver.h"
#include "IniReader.h"
#include <iostream>



#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include <wchar.h>
#include <conio.h>
#include <time.h>
#include <float.h>

#include <vector>
#include <algorithm>
#include <string>

// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <mm3dnow.h>
#include <memory.h>
#include <tchar.h>

using namespace std;
const float PI = 3.14159265;
typedef struct _entry {
        float *vec;                //vector
        int size;                  //vector size
        wchar_t fname[_MAX_PATH];  //vector file name
        int cls;                   //vector class
		int rep;                   //vector repetition
} ENTRY, *PENTRY;

typedef struct _rec {
        vector<PENTRY> entries;         //rec entries
        vector< vector<int> > indices;  //2D array of classes indices
		vector< vector<int> > rindices;  //2D array of repetition indices
        vector<int> clsnum;             //classes numbers of indeces columns
		vector<int> repnum;             //repetition numbers of indeces columns
} REC, *PREC;



/*
   2D type array

    [entry ... vec ...]   (+ size,fname,class type)
    [entry ... vec ...]
    [entry ... vec ...]
    [entry ... vec ...]
     ...
    N = rec.size()

    individual point - rec.entries[y].vec[x]


    indices to y axis of entries vector
     vector<int> x0;  vector<int> x1; vector<int> x2; ... vector<int> xClassesNum

    clsnum[0],clsnum[1], ... clsnum[N]
      [x0][x1][x2][x3] ... [xN]    N different classes
      [x0][x1][x2][x3] ... [xN]
      [x0][x1][x2][x3] ... [xN]
          [x1][x2]
          [x1]
          ...

    example
      rec->clsnum[] =   3, 1, 2    <--  1D vector

                        0  1  8    <--  rec->indices[x].at(y)  2D array
                       10  5  9
                        3  2
                        4  6

                                     */
