Ignore:
Timestamp:
05/02/19 23:50:27 (5 years ago)
Author:
Maciej Komosinski
Message:

Added another, improved way of calculating dissimilarity of two creatures/models. Details and comparisons in https://doi.org/10.1007/978-3-030-16692-2_8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/model/similarity/simil_match.h

    r357 r869  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    88#include <vector>
    99
    10 /** Class describes a mutually single-valued function between two sets of elements
    11         (these sets are called objects). These sets may have different sizes, so this function
    12         is mutually single-valued only for some subset of the bigger set.
    13         This class is used while building a matching function between Parts of two Framsticks'
    14         organisms (similarity measure computation).
     10/** This class describes a mutually single-valued function between two sets of elements
     11        (these sets are called objects). These sets may have different sizes, so this function
     12        is mutually single-valued only for some subset of the bigger set.
     13        This class is used while building a matching function between Parts of two Framsticks'
     14        organisms (similarity measure computation).
    1515 */
    1616class SimilMatching
    1717{
    1818protected:
    19     /** Array of pointers to two vectors. Each one stores indices of matched elements of
    20             the other object. Value <0 means that an element is not matched yet. Sizes of these
    21             vectors are sizes of objects themselves.
    22     */
    23     std::vector<int> *m_apvMatched[2];
     19        /** Array of pointers to two vectors. Each one stores indices of matched elements of
     20                the other object. Value <0 means that an element is not matched yet. Sizes of these
     21                vectors are sizes of objects themselves.
     22        */
     23        std::vector<int> *m_apvMatched[2];
    2424public:
    25     SimilMatching(int Obj0Size, int Obj1Size);
    26     SimilMatching(const SimilMatching &Source);
    27     ~SimilMatching();
    28     int GetObjectSize(int Obj);
    29     void Match(int Obj0, int Index0, int Obj1, int Index1);
    30     bool IsMatched(int Obj, int Index);
    31     int GetMatchedIndex(int Obj, int index);
    32     bool IsFull();
    33     bool IsEmpty();
    34     void Empty();
    35     void PrintMatching();
     25        SimilMatching(int Obj0Size, int Obj1Size);
     26        SimilMatching(const SimilMatching &Source);
     27        ~SimilMatching();
     28        int GetObjectSize(int Obj);
     29        void Match(int Obj0, int Index0, int Obj1, int Index1);
     30        bool IsMatched(int Obj, int Index);
     31        int GetMatchedIndex(int Obj, int index);
     32        bool IsFull();
     33        bool IsEmpty();
     34        void Empty();
     35        void PrintMatching();
    3636};
    3737
Note: See TracChangeset for help on using the changeset viewer.