Rosetta
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
numeric
interpolate.hh
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
/// @file numeric/interpolate.hh
11
/// @author Christopher Miles (cmiles@uw.edu)
12
13
#ifndef INCLUDED_NUMERIC_INTERPOLATE_hh
14
#define INCLUDED_NUMERIC_INTERPOLATE_hh
15
16
namespace
numeric {
17
18
/// @brief Linearly interpolates a quantity from start to stop over (num_stages + 1) stages
19
template
<
class
Value>
20
double
linear_interpolate
(
Value
start
,
Value
stop,
unsigned
curr_stage,
unsigned
num_stages) {
21
return
start + curr_stage * (stop -
start
) / num_stages;
22
}
23
24
}
// namespace numeric
25
26
#endif // INCLUDED_NUMERIC_PROB_UTIL_hh
numeric::linear_interpolate
double linear_interpolate(Value start, Value stop, unsigned curr_stage, unsigned num_stages)
Linearly interpolates a quantity from start to stop over (num_stages + 1) stages. ...
Definition:
interpolate.hh:20
test.Workshop5test.start
tuple start
Definition:
Workshop5test.py:10
utility::json_spirit::Value
Config::Value_type Value
Definition:
json_spirit_value.h:176
Generated on Sun Jan 17 2016 15:21:16 for Rosetta by
1.8.7