Last change
on this file since 2886 was 2732, checked in by Takeshi Nakazato, 12 years ago |
New Development: No
JIRA Issue: Yes CAS-4770
Ready for Test: Yes
Interface Changes: Yes/No
What Interface Changed: Please list interface changes
Test Programs: List test programs
Put in Release Notes: Yes/No
Module(s): Module Names change impacts.
Description: Describe your changes here...
Commit .tcc files for Locator classes.
|
File size:
709 bytes
|
Line | |
---|
1 | //
|
---|
2 | // C++ Implementation: BisectionLocator
|
---|
3 | //
|
---|
4 | // Description:
|
---|
5 | //
|
---|
6 | //
|
---|
7 | // Author: Takeshi Nakazato <takeshi.nakazato@nao.ac.jp>, (C) 2012
|
---|
8 | //
|
---|
9 | // Copyright: See COPYING file that comes with this distribution
|
---|
10 | //
|
---|
11 | //
|
---|
12 | #include <assert.h>
|
---|
13 |
|
---|
14 | #include "BisectionLocator.h"
|
---|
15 |
|
---|
16 | namespace asap {
|
---|
17 | template <class T> BisectionLocator<T>::BisectionLocator()
|
---|
18 | : Locator<T>()
|
---|
19 | {
|
---|
20 | }
|
---|
21 |
|
---|
22 |
|
---|
23 | template <class T> BisectionLocator<T>::BisectionLocator(T *v, unsigned int n, bool copystorage)
|
---|
24 | : Locator<T>(v, n, copystorage)
|
---|
25 | {}
|
---|
26 |
|
---|
27 | template <class T> BisectionLocator<T>::~BisectionLocator()
|
---|
28 | {}
|
---|
29 |
|
---|
30 | template <class T> unsigned int BisectionLocator<T>::locate(T x)
|
---|
31 | {
|
---|
32 | if (this->n_ == 1)
|
---|
33 | return 0;
|
---|
34 |
|
---|
35 | return this->bisection(x, 0, this->n_);
|
---|
36 | }
|
---|
37 |
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.