Xmipp
v3.23.11-Nereus
xmipp
external
condor
VectorChar.h
Go to the documentation of this file.
1
/*
2
3
CONDOR 1.06 - COnstrained, Non-linear, Direct, parallel Optimization
4
using trust Region method for high-computing load,
5
noisy functions
6
Copyright (C) 2004 Frank Vanden Berghen
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation version 2
11
of the License.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
22
If you want to include this tools in any commercial product,
23
you can contact the author at fvandenb@iridia.ulb.ac.be
24
25
*/
26
27
#ifndef _INCLUDE_VectorCHAR_H
28
#define _INCLUDE_VectorCHAR_H
29
30
#include <stdlib.h>
31
32
class
VectorChar
33
{
34
protected
:
35
int
np
,
extention
;
36
public
:
37
char
*
p
;
38
const
int
&
n
;
39
40
VectorChar
(): np(0), extention(0), p(NULL), n(np) {};
41
VectorChar
(
int
_n);
42
VectorChar
(
int
_n,
int
_ext);
43
VectorChar
(
int
_n,
char
*
d
);
44
VectorChar
(
const
VectorChar
& P );
45
VectorChar
(
VectorChar
*v);
46
~VectorChar
();
47
48
void
extend
();
49
void
setSize
(
int
_n);
50
void
exactshape
();
51
void
print
();
52
53
// only use the following method at your own risks!
54
void
prepareExtend
(
int
new_extention);
55
56
// int &operator [](int i) { return p[i]; };
57
inline
int
sz
() {
return
np
;};
58
char
operator==
(
const
VectorChar
& );
59
VectorChar
&
operator=
(
const
VectorChar
& P );
60
operator
char
*()
const
{
return
p
; };
61
// operator unsigned*() const { return (unsigned*)p; };
62
// int &operator[]( unsigned i) {return p[i];};
63
64
void
set
(
char
c
);
65
66
private
:
67
void
alloc();
68
69
};
70
71
#endif
72
VectorChar::extend
void extend()
Definition:
VectorChar.cpp:80
VectorChar::VectorChar
VectorChar()
Definition:
VectorChar.h:40
VectorChar::print
void print()
Definition:
VectorChar.cpp:135
VectorChar::n
const int & n
Definition:
VectorChar.h:38
VectorChar::prepareExtend
void prepareExtend(int new_extention)
Definition:
VectorChar.cpp:63
c
doublereal * c
Definition:
numerical_recipes.cpp:2230
VectorChar::p
char * p
Definition:
VectorChar.h:37
d
doublereal * d
Definition:
numerical_recipes.cpp:2230
VectorChar::~VectorChar
~VectorChar()
Definition:
VectorChar.cpp:95
VectorChar
Definition:
VectorChar.h:32
VectorChar::operator==
char operator==(const VectorChar &)
Definition:
VectorChar.cpp:100
VectorChar::setSize
void setSize(int _n)
Definition:
VectorChar.cpp:73
VectorChar::exactshape
void exactshape()
Definition:
VectorChar.cpp:86
VectorChar::extention
int extention
Definition:
VectorChar.h:35
VectorChar::sz
int sz()
Definition:
VectorChar.h:57
VectorChar::np
int np
Definition:
VectorChar.h:35
VectorChar::operator=
VectorChar & operator=(const VectorChar &P)
Definition:
VectorChar.cpp:116
Generated by
1.8.13