Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
nmslib/data/data_conv/sqfd/utils.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38 lines (33 sloc)
1.11 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Non-metric Space Library | |
* | |
* Main developers: Bilegsaikhan Naidan, Leonid Boytsov, Yury Malkov, Ben Frederickson, David Novak | |
* | |
* For the complete list of contributors and further details see: | |
* https://github.com/searchivarius/NonMetricSpaceLib | |
* | |
* Copyright (c) 2013-2018 | |
* | |
* This code is released under the | |
* Apache License Version 2.0 http://www.apache.org/licenses/. | |
* | |
*/ | |
#ifndef _UTILS_H_ | |
#define _UTILS_H_ | |
#include <vector> | |
#include <string> | |
namespace sqfd { | |
float Normalize(float val, float min_val, float max_val); | |
float Denormalize(float val, float min_val, float max_val); | |
bool Startswith(std::string s, std::string prefix); | |
bool Endswith(std::string s, std::string suffix); | |
bool IsFileExists(const std::string& path); | |
bool IsDirectoryExists(const std::string& path); | |
bool IsImageFile(const std::string& file); | |
void MakeDirectory(const std::string& path); | |
std::vector<std::string> GetAllFiles(const std::string& path); | |
std::vector<std::string> GetImageFiles(const std::string& path); | |
std::string GetBasename(std::string filename); | |
std::string GetDirname(std::string filename); | |
} | |
#endif // _UTILS_H_ |