Commit 82801df8 authored by Davis King's avatar Davis King

Moved null_df into its own file.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404068
parent c1a82697
// Copyright (C) 2010 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifndef DLIB_NULL_DECISION_FUnCTION_H__
#define DLIB_NULL_DECISION_FUnCTION_H__
#include <iostream>
namespace dlib
{
// ----------------------------------------------------------------------------------------
struct null_df
{
/*!
WHAT THIS OBJECT REPRESENTS
This is a type used to represent an unused field in the list of template
arguments of the one_vs_one_decision_function and one_vs_all_decision_function
templates. As such, null_df doesn't actually do anything.
!*/
template <typename T>
double operator() ( const T&) const { return 0; }
};
inline void serialize(const null_df&, std::ostream&) {}
inline void deserialize(null_df&, std::istream&) {}
// ----------------------------------------------------------------------------------------
}
#endif // DLIB_NULL_DECISION_FUnCTION_ABSTRACT_H__
......@@ -13,21 +13,11 @@
#include <map>
#include "../any.h"
#include "../unordered_pair.h"
#include "null_df.h"
namespace dlib
{
// ----------------------------------------------------------------------------------------
struct null_df
{
template <typename T>
double operator() ( const T&) const { return 0; }
};
inline void serialize(const null_df&, std::ostream&) {}
inline void deserialize(null_df&, std::istream&) {}
// ----------------------------------------------------------------------------------------
template <
......
......@@ -9,24 +9,11 @@
#include "../any/any_decision_function_abstract.h"
#include "../unordered_pair.h"
#include "one_vs_one_trainer_abstract.h"
#include "null_df.h"
namespace dlib
{
// ----------------------------------------------------------------------------------------
struct null_df
{
/*!
WHAT THIS OBJECT REPRESENTS
This is a type used to represent an unused field in the
list of template arguments of the one_vs_one_decision_function
defined below. As such, this object doesn't actually do anything.
!*/
template <typename T>
double operator() ( const T&) const { return 0; }
};
// ----------------------------------------------------------------------------------------
template <
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment