Skip to content

Commit

Permalink
Add header guards.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville committed Oct 13, 2018
1 parent bea2159 commit 6dadaa6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gradient.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

// The standard UMAP gradient

#ifndef UWOT_GRADIENT_H
#define UWOT_GRADIENT_H

class umap_gradient {
public:
umap_gradient(const double a, const double b, const double gamma);
Expand Down Expand Up @@ -66,7 +69,9 @@ class largevis_gradient {
const double grad_attr(const double dist_squared) const;
const double grad_rep(const double dist_squared) const;
static const constexpr double clip_max = 5.0;

private:
const double gamma_2;
};

#endif // UWOT_GRADIENT_H
6 changes: 6 additions & 0 deletions src/tauprng.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
// along with UWOT. If not, see <http://www.gnu.org/licenses/>.

// Three-component combined Tausworthe "taus88" PRNG from L'Ecuyer 1996.

#ifndef UWOT_TAUPRNG_H
#define UWOT_TAUPRNG_H

class tau_prng {
long long state0;
long long state1;
Expand All @@ -37,3 +41,5 @@ class tau_prng {
return state0 ^ state1 ^ state2;
}
};

#endif // UWOT_TAUPRNG_H

0 comments on commit 6dadaa6

Please sign in to comment.