00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef BMATCHINGLIBRARY_H_
00017 #define BMATCHINGLIBRARY_H_
00018
00019 #include "WeightOracle.h"
00020 #include "SparseMatrix.h"
00021 #include "BipartiteFunctionOracle.h"
00022 #include "BipartiteMatrixOracle.h"
00023 #include "FunctionOracle.h"
00024 #include "MatrixOracle.h"
00025 #include "EuclideanDistance.h"
00026 #include "InnerProduct.h"
00027 #include "BeliefPropagator.h"
00028 #include "BMatchingProblem.h"
00029
00037 namespace bmatchingLibrary {
00038
00039
00040
00053 SparseMatrix<bool> * bMatchBipartiteMatrixCache(int rows, int cols, double ** W, int * brows, int *bcols, int cacheSize, int maxIters, bool verbose = false);
00064 SparseMatrix<bool> * bMatchBipartiteMatrixSparse(int rows, int cols, double ** W, int * brows, int *bcols, int maxIters);
00074 SparseMatrix<bool> * bMatchBipartiteMatrixSparse(int rows, int cols, double ** W, int * brows, int *bcols);
00085 bool ** bMatchBipartiteMatrix(int rows, int cols, double ** W, int * brows, int *bcols, int maxIters);
00095 bool ** bMatchBipartiteMatrix(int rows, int cols, double ** W, int * brows, int *bcols);
00096
00112 SparseMatrix<bool> * bMatchBipartiteEuclideanCache(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int cacheSize, int maxIters, bool verbose = false);
00125 SparseMatrix<bool> * bMatchBipartiteEuclideanSparse(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int maxIters);
00137 SparseMatrix<bool> * bMatchBipartiteEuclideanSparse(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols);
00150 bool ** bMatchBipartiteEuclidean(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int maxIters);
00162 bool ** bMatchBipartiteEuclidean(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols);
00163
00178 SparseMatrix<bool> * bMatchBipartiteInnerProductCache(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int cacheSize, int maxIters, bool verbose = false);
00191 SparseMatrix<bool> * bMatchBipartiteInnerProductSparse(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int maxIters);
00203 SparseMatrix<bool> * bMatchBipartiteInnerProductSparse(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols);
00216 bool ** bMatchBipartiteInnerProduct(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols, int maxIters);
00228 bool ** bMatchBipartiteInnerProduct(int rows, int cols, int d, double ** X, double ** Y, int * brows, int * bcols);
00229
00240 SparseMatrix<bool> * bMatchMatrixCache(int size, double ** W, int * b, int cacheSize, int maxIters, bool verbose = false);
00249 SparseMatrix<bool> * bMatchMatrixSparse(int size, double ** W, int * b, int maxIters);
00257 SparseMatrix<bool> * bMatchMatrixSparse(int size, double ** W, int * b);
00266 bool ** bMatchMatrix(int size, double ** W, int * b, int maxIters);
00274 bool ** bMatchMatrix(int size, double ** W, int * b);
00275
00287 SparseMatrix<bool> * bMatchEuclideanCache(int size, int d, double ** X, int * b, int cacheSize, int maxIters, bool verbose = false);
00297 SparseMatrix<bool> * bMatchEuclideanSparse(int size, int d, double ** X, int * b, int maxIters);
00306 SparseMatrix<bool> * bMatchEuclideanSparse(int size, int d, double ** X, int * b);
00316 bool ** bMatchEuclidean(int size, int d, double ** X, int * b, int maxIters);
00325 bool ** bMatchEuclidean(int size, int d, double ** X, int * b);
00326
00338 SparseMatrix<bool> * bMatchInnerProductCache(int size, int d, double ** X, int * b, int cacheSize, int maxIters, bool verbose = false);
00348 SparseMatrix<bool> * bMatchInnerProductSparse(int size, int d, double ** X, int * b, int maxIters);
00357 SparseMatrix<bool> * bMatchInnerProductSparse(int size, int d, double ** X, int * b);
00367 bool ** bMatchInnerProduct(int size, int d, double ** X, int * b, int maxIters);
00376 bool ** bMatchInnerProduct(int size, int d, double ** X, int * b);
00377
00378
00379
00380
00389 SparseMatrix<bool> * solveBMatchingSparse(WeightOracle * wo, int * b, int maxIters, bool verbose = false);
00390
00396 bool ** convertToBool(SparseMatrix<bool> * solution);
00397
00406 int * cat(int * a, int * b, int aSize, int bSize);
00407 }
00408
00409 #endif