Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91527419
function.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 11, 22:34
Size
2 KB
Mime Type
text/x-c++
Expires
Wed, Nov 13, 22:34 (2 d)
Engine
blob
Format
Raw Data
Handle
22225100
Attached To
rTAMAAS tamaas
function.hh
View Options
/**
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2016 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Tamaas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __INTER_FUNC__
#define __INTER_FUNC__
/* -------------------------------------------------------------------------- */
#include <vector>
/* -------------------------------------------------------------------------- */
#include <string.h>
#include <string>
#include <fftw.h>
#include <iostream>
#include <fstream>
/* -------------------------------------------------------------------------- */
#include <string>
#include <math.h>
/* -------------------------------------------------------------------------- */
enum
INTER_FUNCTION_TYPE
{
ZERO
,
LINEAR
,
SQ_ROOT
,
PARABOLA
,
CUBIC_HERMITE
,
CUBIC_BEZIER
,
QUADRATIC_BEZIER
,
TEST_INTER
};
class
INTER_FUNC
{
public
:
INTER_FUNC
();
INTER_FUNC
(
INTER_FUNCTION_TYPE
type_
,
std
::
vector
<
Real
>
points_
);
INTER_FUNC
(
INTER_FUNCTION_TYPE
type_
,
std
::
vector
<
Real
>
points_
,
Real
a
);
~
INTER_FUNC
();
INTER_FUNCTION_TYPE
type
;
bool
sm_error
;
std
::
vector
<
Real
>
points
,
coef
;
// return function value for 0<=x<1
Real
get_value
(
Real
x
);
Real
get_derivative
(
Real
x
);
};
#endif
Event Timeline
Log In to Comment