Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
d3b946ff
Commit
d3b946ff
authored
11 years ago
by
Norihiro Watanabe
Browse files
Options
Downloads
Patches
Plain Diff
add a linear function of space
parent
a81b346b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NumLib/Function/SpatialFunctionLinear.h
+27
-0
27 additions, 0 deletions
NumLib/Function/SpatialFunctionLinear.h
NumLib/Function/TemplateSpatialFunction.h
+54
-0
54 additions, 0 deletions
NumLib/Function/TemplateSpatialFunction.h
with
81 additions
and
0 deletions
NumLib/Function/SpatialFunctionLinear.h
0 → 100644
+
27
−
0
View file @
d3b946ff
/**
* \author Norihiro Watanabe
* \date 2013-08-13
*
* \copyright
* Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#ifndef SPATIALFUNCTIONLINEAR_H_
#define SPATIALFUNCTIONLINEAR_H_
#include
"MathLib/LinearFunction.h"
#include
"TemplateSpatialFunction.h"
namespace
NumLib
{
/// Linear function of space
typedef
TemplateSpatialFunction
<
MathLib
::
LinearFunction
<
double
,
3
>
>
SpatialFunctionLinear
;
}
#endif
/* SPATIALFUNCTIONLINEAR_H_ */
This diff is collapsed.
Click to expand it.
NumLib/Function/TemplateSpatialFunction.h
0 → 100644
+
54
−
0
View file @
d3b946ff
/**
* \author Norihiro Watanabe
* \date 2013-08-13
*
* \copyright
* Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#ifndef TEMPLATESPATIALFUNCTION_H_
#define TEMPLATESPATIALFUNCTION_H_
#include
"ISpatialFunction.h"
namespace
NumLib
{
/**
* Template class to relate pure mathematical functions with ISpatialFunction
*
* @tparam T_FUNCTION Function object which takes "double const* const" as an argument.
*/
template
<
class
T_FUNCTION
>
class
TemplateSpatialFunction
:
public
ISpatialFunction
{
public:
/**
* Constructor
* @param f a function object
*/
TemplateSpatialFunction
(
const
T_FUNCTION
&
f
)
:
_f
(
f
)
{}
/**
* evaluate a function
* @param pnt a point object
* @return evaluated value
*/
virtual
double
operator
()(
const
GeoLib
::
Point
&
pnt
)
const
{
return
_f
(
pnt
.
getCoords
());
}
private
:
/// a function object
const
T_FUNCTION
_f
;
};
}
#endif
/* TEMPLATESPATIALFUNCTION_H_ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment