SlideShare a Scribd company logo
Reference Manual
Generated by Doxygen 1.6.3
Mon Dec 5 12:55:58 2011
Contents
1

1

1.1
2

Class Index

1

Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

2.1
3

File Index

3

File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Class Documentation

5

3.1

Element Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.2

Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . .

5

3.1.2.1

Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.2.2

∼Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.1.3.1

operator< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.1.3.2

operator<= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.1.3.3

operator> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.1.3.4

value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

3.1.3.5

value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

ElementVector Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3.2.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3.2.2

Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . .

8

3.2.2.1

ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3.2.2.2

∼ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3.2.3.1

absMaxValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3.2.3.2

add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3.2.3.3

at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3.2.3.4

clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

3.2.3.5

isEmpty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

3.1.3

3.2

3.2.3
ii

CONTENTS
3.2.3.6

minValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

3.2.3.8

operator[] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

3.2.3.9

push_back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

3.2.3.10 resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3.2.3.11 size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3.2.3.12 sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3.2.3.13 swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

PredicateSort Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

3.3.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

3.3.2

Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . .

13

3.3.2.1
4

10

3.2.3.7

3.3

maxValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

operator() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

File Documentation

15

4.1

Element.cxx File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

4.2

Element.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.3

Element.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.4

Element.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.5

Sys-Element.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.5.1

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.5.1.1

main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

Sys-Element.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.6

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
Chapter 1

Class Index
1.1

Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PredicateSort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5
8
13
2

Class Index

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
Chapter 2

File Index
2.1

File List

Here is a list of all files with brief descriptions:
Element.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Element.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sys-Element.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15
17
20
4

File Index

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
Chapter 3

Class Documentation
3.1

Element Class Reference

#include <Element.h>

Public Member Functions
•
•
•
•
•
•
•

Element (long double value=0.0)
void value (long double Value)
long double value (void)
bool operator> (Element &e)
bool operator< (Element &e)
bool operator<= (Element &e)
virtual ∼Element ()

3.1.1

Detailed Description

Classe para armazenamento das caracteristicas de um determinado elemento
Definition at line 18 of file Element.h.

3.1.2

Constructor & Destructor Documentation

3.1.2.1

Element::Element (long double value = 0.0) [inline]

Método construtor da classe.
Definition at line 30 of file Element.h.
00030 {_value = value;};

Here is the call graph for this function:
Element::Element

Element::value
6
3.1.2.2

Class Documentation
virtual Element::∼Element () [inline, virtual]

Método destrutor. Responsável por liberar todos os recursos alocados pela classe.
Definition at line 61 of file Element.h.
00061 {};

3.1.3

Member Function Documentation

3.1.3.1

bool Element::operator< (Element & e) [inline]

Sobrecarga do operador < para simplificação da comparação de valores.
Definition at line 50 of file Element.h.
00050 { return (this->value() < e.value()); };

Here is the call graph for this function:
Element::operator<

3.1.3.2

Element::value

bool Element::operator<= (Element & e) [inline]

Sobrecarga do operador <= para simplificação da comparação de valores.
Definition at line 55 of file Element.h.
00055 { return (this->value() <= e.value()); };

Here is the call graph for this function:
Element::operator<=

3.1.3.3

Element::value

bool Element::operator> (Element & e) [inline]

Sobrecarga do operador > para simplificação da comparação de valores.
Definition at line 45 of file Element.h.
00045 { return (this->value() > e.value()); };

Here is the call graph for this function:
Element::operator>

Element::value

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
3.1 Element Class Reference
3.1.3.4

7

long double Element::value (void) [inline]

Método que retorna o valor contido no atributo value.
Definition at line 40 of file Element.h.
00040 { return _value; };

Here is the caller graph for this function:
Element::Element

Element::operator<
Element::value
Element::operator<=

Element::operator>

3.1.3.5

void Element::value (long double Value) [inline]

Método que atribui um valor ao atributo value.
Definition at line 35 of file Element.h.
00035 { _value = Value; };

Here is the caller graph for this function:
main

ElementVector::maxValue
ElementVector::absMaxValue
ElementVector::minValue
Element::value
Element::operator<

Element::operator<=

Element::operator>

The documentation for this class was generated from the following file:
• Element.h

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
8

Class Documentation

3.2

ElementVector Class Reference

#include <Element.h>

Public Member Functions
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

ElementVector (void)
long double maxValue (void)
long double minValue (void)
long double absMaxValue (void)
bool isEmpty (void)
void resize (unsigned int new_size)
void sort (void)
unsigned int size (void)
Element at (unsigned int index)
Element & operator[ ] (unsigned int index)
void push_back (Element e)
void add (Element e)
void swap (unsigned int position_a, unsigned int position_b)
void clear (void)
virtual ∼ElementVector ()

3.2.1

Detailed Description

Classe para armazenamento de uma lista de elementos
Definition at line 76 of file Element.h.

3.2.2

Constructor & Destructor Documentation

3.2.2.1

ElementVector::ElementVector (void) [inline]

Método construtor da classe.
Definition at line 88 of file Element.h.
00088 {};

3.2.2.2

virtual ElementVector::∼ElementVector () [inline, virtual]

Método destrutor. Responsável por liberar todos os recursos alocados pela classe.
Definition at line 163 of file Element.h.
00163 { clear(); }

Here is the call graph for this function:
ElementVector::~ElementVector

ElementVector::clear

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
3.2 ElementVector Class Reference

9

3.2.3

Member Function Documentation

3.2.3.1

long double ElementVector::absMaxValue (void)

Método que retorna o maior valor absoluto contido na lista.
Definition at line 54 of file Element.cxx.
00055 {
00056
return (fabsl(maxValue()) > fabsl(minValue()))?(maxValue()):(fabsl(minValue()))
;
00057 }

Here is the call graph for this function:
ElementVector::maxValue

ElementVector::at

ElementVector::minValue

Element::value

ElementVector::absMaxValue

3.2.3.2

void ElementVector::add (Element e) [inline]

Método que insere elementos na lista
Definition at line 146 of file Element.h.
00146 { this->push_back(e);

}

Here is the call graph for this function:
ElementVector::add

ElementVector::push_back

Here is the caller graph for this function:
ElementVector::add

3.2.3.3

main

Element ElementVector::at (unsigned int index) [inline]

Método que retorna o elemento de uma determinada posição
Definition at line 128 of file Element.h.
00128 { return _list.at(index); };

Here is the caller graph for this function:
ElementVector::maxValue
ElementVector::at

ElementVector::absMaxValue
ElementVector::minValue

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
10
3.2.3.4

Class Documentation
void ElementVector::clear (void) [inline]

Método que executa limpeza da lista de elementos
Definition at line 157 of file Element.h.
00157 { _list.clear(); }

Here is the caller graph for this function:
ElementVector::clear

3.2.3.5

ElementVector::~ElementVector

bool ElementVector::isEmpty (void) [inline]

Método que verifica se a alista está vazia
Definition at line 108 of file Element.h.
00108 { return _list.empty(); };

3.2.3.6

long double ElementVector::maxValue (void)

Método que retorna o maior valor existente na lista de elementos
Definition at line 13 of file Element.cxx.
00014 {
00015
//Verificando se a lista foi preenchida ...
00016
if (_list.size() == 0 ) return 0;
00017
00018
//Resgatando o primeiro elemento da lista para verificação do maior elemento
00019
long double maximo = at(0).value();
00020
00021
//Looping para verificação do maior elemento
00022
for (unsigned int index = 1; index < _list.size(); index++)
00023
{
00024
if (maximo < at(index).value()) maximo = at(index).value();
00025
}
00026
00027
//Retornando o maior valor da lista
00028
return maximo;
00029 }

Here is the call graph for this function:
ElementVector::at
ElementVector::maxValue
Element::value

Here is the caller graph for this function:
ElementVector::maxValue

ElementVector::absMaxValue

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
3.2 ElementVector Class Reference
3.2.3.7

11

long double ElementVector::minValue (void)

Método que retorna o menor valor existente na lista de elementos
Definition at line 33 of file Element.cxx.
00034 {
00035
//Verificando se a lista foi preenchida ...
00036
if (_list.size() == 0 ) return 0;
00037
00038
//Resgatando o primeiro elemento da lista para verificação do maior elemento
00039
long double minimo = at(0).value();
00040
00041
//Looping para verificação do maior elemento
00042
for (unsigned int index = 1; index < _list.size(); index++)
00043
{
00044
if (minimo > at(index).value()) minimo = at(index).value();
00045
}
00046
00047
//Retornando o maior valor da lista
00048
return minimo;
00049 }

Here is the call graph for this function:
ElementVector::at
ElementVector::minValue
Element::value

Here is the caller graph for this function:
ElementVector::minValue

3.2.3.8

ElementVector::absMaxValue

Element& ElementVector::operator[ ] (unsigned int index) [inline]

Sobrecarga do operador [] para simplificar o acesso a um determinado elemento. Lembrando que esse
operador devolve uma referência, o que faz que acessemos diretamente o valor do objeto, além disso não
executamos verificação de limites com esse operador, isso fica a cargo do programador.
Definition at line 136 of file Element.h.
00136 { return _list[index]; };

3.2.3.9

void ElementVector::push_back (Element e) [inline]

Método que insere elementos na lista
Definition at line 141 of file Element.h.
00141 { _list.push_back(e); }
Generated on Mon Dec 5 12:55:58 2011 by Doxygen
12

Class Documentation

Here is the caller graph for this function:
ElementVector::push_back

3.2.3.10

ElementVector::add

main

void ElementVector::resize (unsigned int new_size) [inline]

Método que executa um resize na lista de elementos
Definition at line 113 of file Element.h.
00113 { _list.resize(new_size); };

3.2.3.11

unsigned int ElementVector::size (void) [inline]

Método que retorna o tamanho da lista de elementos
Definition at line 123 of file Element.h.
00123 { return _list.size(); }

Here is the caller graph for this function:
ElementVector::size

3.2.3.12

main

void ElementVector::sort (void) [inline]

Método que utiliza o algoritmo de ordenação quick sort fornecido pela STL
Definition at line 118 of file Element.h.
00118 { std::sort(_list.begin(), _list.end(), PredicateSort()); };

3.2.3.13

void ElementVector::swap (unsigned int position_a, unsigned int position_b)

Método que executa a troca entre dois valores de uma determinada posição dentro da lista de elementos.
Definition at line 63 of file Element.cxx.
00064 {
00065
//Executa a troca dos valores
00066
long double temp = _list[position_a].value();
00067
_list[position_a].value( _list[position_b].value() );
00068
_list[position_b].value(temp);
00069 }

The documentation for this class was generated from the following files:
• Element.h
• Element.cxx
Generated on Mon Dec 5 12:55:58 2011 by Doxygen
3.3 PredicateSort Struct Reference

3.3

PredicateSort Struct Reference

#include <Element.h>

Public Member Functions
• bool operator() (Element a, Element b)

3.3.1

Detailed Description

Estrutura auxiliar usada como predicado para executar ordenação usando o quicksort interno da STL.
Definition at line 68 of file Element.h.

3.3.2

Member Function Documentation

3.3.2.1

bool PredicateSort::operator() (Element a, Element b) [inline]

Definition at line 70 of file Element.h.
00070 { return a < b; }

The documentation for this struct was generated from the following file:
• Element.h

Generated on Mon Dec 5 12:55:58 2011 by Doxygen

13
14

Class Documentation

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
Chapter 4

File Documentation
4.1

Element.cxx File Reference

#include "Element.h"
#include <vector>
#include <cmath>
#include <algorithm>
Include dependency graph for Element.cxx:
Element.cxx

vector

cmath

algorithm

This graph shows which files directly or indirectly include this file:
Element.cxx
16

4.2
00001
00002
00003
00004
00005
00006
00007
00008
00009
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00054
00055
00056

File Documentation

Element.cxx
/*
* _Element.cpp
*
* Created on: 25/10/2009
Author: Administrador
*
*/
#include "Element.h"
long double ElementVector::maxValue(void)
{
//Verificando se a lista foi preenchida ...
if (_list.size() == 0 ) return 0;
//Resgatando o primeiro elemento da lista para verificação do maior elemento
long double maximo = at(0).value();
//Looping para verificação do maior elemento
for (unsigned int index = 1; index < _list.size(); index++)
{
if (maximo < at(index).value()) maximo = at(index).value();
}
//Retornando o maior valor da lista
return maximo;
}
long double ElementVector::minValue(void)
{
//Verificando se a lista foi preenchida ...
if (_list.size() == 0 ) return 0;
//Resgatando o primeiro elemento da lista para verificação do maior elemento
long double minimo = at(0).value();
//Looping para verificação do maior elemento
for (unsigned int index = 1; index < _list.size(); index++)
{
if (minimo > at(index).value()) minimo = at(index).value();
}
//Retornando o maior valor da lista
return minimo;
}

long double ElementVector::absMaxValue(void)
{
return (fabsl(maxValue()) > fabsl(minValue()))?(maxValue()):(fabsl(minValue()))
;
00057 }
00058
00063 void ElementVector::swap(unsigned int position_a, unsigned int position_b)
00064 {
00065
//Executa a troca dos valores
00066
long double temp = _list[position_a].value();
00067
_list[position_a].value( _list[position_b].value() );
00068
_list[position_b].value(temp);
00069 }
00070
00071

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
4.3 Element.h File Reference

4.3

17

Element.h File Reference

#include <vector>
#include <cmath>
#include <algorithm>
Include dependency graph for Element.h:
Element.h

vector

cmath

algorithm

This graph shows which files directly or indirectly include this file:
Element.h

Sys-Element.cpp

Classes
• class Element
• struct PredicateSort
• class ElementVector

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
18

4.4
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00018
00019
00023
00024
00025
00026
00030
00031
00035
00036
00040
00041
00045
00046
00050
00051
00055
00056
00061
00062
00063
00068
00069
00070
00071
00072
00076
00077
00081
00082
00083
00084
00088
00089
00093
00094
00098
00099
00103
00104
00108
00109
00113
00114
00118
00119
00123
00124
00128
00129
00136

File Documentation

Element.h
/*
* Element.h
*
* Created on: 25/10/2009
* Author: Michel Alves dos Santos
*/
#ifndef _ELEMENT_H_
#define _ELEMENT_H_
#include <vector>
#include <cmath>
#include <algorithm>
class Element
{
long double _value;
public :
Element(long double value = 0.0){_value = value;};
void

value(long double Value) { _value = Value; };

long double value(void)

{ return _value; };

bool operator > (Element& e) { return (this->value() > e.value()); };
bool operator < (Element& e) { return (this->value() < e.value()); };
bool operator <= (Element& e) { return (this->value() <= e.value()); };
virtual ~Element() {};
};
struct PredicateSort
{
bool operator()(Element a, Element b) { return a < b; }
};
class ElementVector
{
std::vector<Element>

_list;

public:
ElementVector(void){};
long double maxValue(void);
long double minValue(void);
long double absMaxValue(void);
bool isEmpty(void) { return _list.empty(); };
void resize(unsigned int new_size) { _list.resize(new_size); };
void sort(void) { std::sort(_list.begin(), _list.end(), PredicateSort()); };
unsigned int size(void) { return _list.size(); }
Element at(unsigned int index) { return _list.at(index); };
Element& operator [](unsigned int index) { return _list[index]; };
Generated on Mon Dec 5 12:55:58 2011 by Doxygen
4.4 Element.h
00137
00141
void push_back(Element e) { _list.push_back(e); }
00142
00146
void add(Element e)
{ this->push_back(e); }
00147
00152
void swap(unsigned int position_a, unsigned int position_b);
00153
00157
void clear(void) { _list.clear(); }
00158
00163
virtual ~ElementVector(){ clear(); }
00164 };
00165
00166 #endif /* _ELEMENT_H_ */

Generated on Mon Dec 5 12:55:58 2011 by Doxygen

19
20

File Documentation

4.5

Sys-Element.cpp File Reference

#include <iostream>
#include "Element.h"
Include dependency graph for Sys-Element.cpp:
Sys-Element.cpp

iostream

Element.h

vector

cmath

algorithm

Functions
• int main (int argc, char ∗argv[ ])

4.5.1

Function Documentation

4.5.1.1

int main (int argc, char ∗ argv[ ])

Função para testes com a biblioteca.
Definition at line 13 of file Sys-Element.cpp.
00014 {
00015
Element e(10.5);
00016
ElementVector ev;
00017
00018
ev.add(e); ev.add(Element(11.15)); ev.add(Element(9.5));
00019
00020
std::cout << "Valor armazenado: " << e.value() << std::endl;
00021
std::cout << "Número de elementos na lista: " << ev.size() << std::endl;
00022
00023
return 0;
00024 }

Here is the call graph for this function:
ElementVector::add

main

ElementVector::push_back

ElementVector::size

Element::value

Generated on Mon Dec 5 12:55:58 2011 by Doxygen
4.6 Sys-Element.cpp

4.6
00001
00002
00003
00004
00005
00006
00007
00008
00009
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024

Sys-Element.cpp
//============================================================================
// Name
: Sys-Element
// Author
: Michel Alves dos Santos
// Version
: 1.00 Beta
//============================================================================
#include <iostream>
#include "Element.h"
int main(int argc, char* argv[])
{
Element e(10.5);
ElementVector ev;
ev.add(e); ev.add(Element(11.15)); ev.add(Element(9.5));
std::cout << "Valor armazenado: " << e.value() << std::endl;
std::cout << "Número de elementos na lista: " << ev.size() << std::endl;
return 0;
}

Generated on Mon Dec 5 12:55:58 2011 by Doxygen

21
Index
∼Element
Element, 5
∼ElementVector
ElementVector, 8
absMaxValue
ElementVector, 9
add
ElementVector, 9
at
ElementVector, 9

ElementVector, 10
minValue
ElementVector, 10
operator<
Element, 6
operator<=
Element, 6
operator>
Element, 6
operator()
PredicateSort, 13

clear
ElementVector, 9
Element, 5
∼Element, 5
Element, 5
operator<, 6
operator<=, 6
operator>, 6
value, 6, 7
Element.cxx, 15
Element.h, 17
ElementVector, 8
∼ElementVector, 8
absMaxValue, 9
add, 9
at, 9
clear, 9
ElementVector, 8
isEmpty, 10
maxValue, 10
minValue, 10
push_back, 11
resize, 12
size, 12
sort, 12
swap, 12
isEmpty
ElementVector, 10
main
Sys-Element.cpp, 20
maxValue

PredicateSort, 13
operator(), 13
push_back
ElementVector, 11
resize
ElementVector, 12
size
ElementVector, 12
sort
ElementVector, 12
swap
ElementVector, 12
Sys-Element.cpp, 20
main, 20
value
Element, 6, 7

More Related Content

PDF
Cuda toolkit reference manual
PDF
Cimplementation
PDF
Let us c++ yeshwant kanetkar
PDF
PostgreSQL 11 New Features With Examples (English)
PDF
PDF
Work flow api reference
PDF
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
Cuda toolkit reference manual
Cimplementation
Let us c++ yeshwant kanetkar
PostgreSQL 11 New Features With Examples (English)
Work flow api reference
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)

What's hot (18)

PDF
Metatron Technology Consulting 's MySQL to PostgreSQL ...
PDF
Percona toolkit 2_1_operations_manual
PDF
C++ annotations version
PDF
Aplplication server instalacion
PDF
SCRM[1]
PDF
Schedule Classes DataLab Community
PDF
PostgreSQL 11 New Features English version (Beta 1)
PDF
Ixp425
PDF
Tutorial111
PDF
Deployment guide series ibm tivoli usage and accounting manager v7.1 sg247569
PDF
Apis php-en sql .
PDF
WebHost Manager Online Help 1.0
PDF
ENERGY EFFICIENCY OF ARM ARCHITECTURES FOR CLOUD COMPUTING APPLICATIONS
PDF
Dbe emailer software documentation user guide
PDF
OpenGL Spec 4.4 Core
PDF
301132
Metatron Technology Consulting 's MySQL to PostgreSQL ...
Percona toolkit 2_1_operations_manual
C++ annotations version
Aplplication server instalacion
SCRM[1]
Schedule Classes DataLab Community
PostgreSQL 11 New Features English version (Beta 1)
Ixp425
Tutorial111
Deployment guide series ibm tivoli usage and accounting manager v7.1 sg247569
Apis php-en sql .
WebHost Manager Online Help 1.0
ENERGY EFFICIENCY OF ARM ARCHITECTURES FOR CLOUD COMPUTING APPLICATIONS
Dbe emailer software documentation user guide
OpenGL Spec 4.4 Core
301132
Ad

Viewers also liked (9)

PDF
Capacity-Constrained Point Distributions :: Density Function Catalog
PDF
Five Minute Speech - Building a Prototype for a Lightweight Image Processing ...
PDF
FLTK Summer Course - Part IV - Fourth Impact
PDF
TMS - Schedule of Presentations and Reports
PDF
Introduction to Image Processing - Short Course - Part III
PDF
FLTK Summer Course - Part II - Second Impact
PDF
Capacity-Constrained Point Distributions :: Video Slides
PDF
Documentation - Reference Manual - SysSorting
PDF
Minimal Introduction to C++ - Part III - Final
Capacity-Constrained Point Distributions :: Density Function Catalog
Five Minute Speech - Building a Prototype for a Lightweight Image Processing ...
FLTK Summer Course - Part IV - Fourth Impact
TMS - Schedule of Presentations and Reports
Introduction to Image Processing - Short Course - Part III
FLTK Summer Course - Part II - Second Impact
Capacity-Constrained Point Distributions :: Video Slides
Documentation - Reference Manual - SysSorting
Minimal Introduction to C++ - Part III - Final
Ad

Similar to Documentation - Element and ElementVector (20)

PDF
ID3 Algorithm - Reference Manual
PDF
Isoiec 148822011 Information Technology Programming Languages C 3rd Edition Iso
PDF
R Lang
PDF
refman
PDF
C++ For Quantitative Finance
PDF
Mastering Modern C++: C++11, C++14, C++17, C++20, C++23
PDF
data structures
PPT
Operator overloading
PDF
Data struture and aligorism
PDF
PDF
Sppu University|BE|Computer Engineering|OOPs|unit 6 notes|ppt
PPT
w10 (1).ppt
PPTX
C++ process new
PDF
Documentation - LibraryRandom
PDF
Thats How We C
PPTX
Object Oriented Programming Using C++: C++ STL Programming.pptx
PDF
Francois fleuret -_c++_lecture_notes
PPTX
Standard Template Library
PPTX
Vector class in C++
ID3 Algorithm - Reference Manual
Isoiec 148822011 Information Technology Programming Languages C 3rd Edition Iso
R Lang
refman
C++ For Quantitative Finance
Mastering Modern C++: C++11, C++14, C++17, C++20, C++23
data structures
Operator overloading
Data struture and aligorism
Sppu University|BE|Computer Engineering|OOPs|unit 6 notes|ppt
w10 (1).ppt
C++ process new
Documentation - LibraryRandom
Thats How We C
Object Oriented Programming Using C++: C++ STL Programming.pptx
Francois fleuret -_c++_lecture_notes
Standard Template Library
Vector class in C++

More from Michel Alves (20)

PDF
Texture Synthesis: An Approach Based on GPU Use
PDF
Intelligent Transfer of Thematic Harmonic Color Palettes
PDF
A Framework for Harmonic Color Measures
PDF
Effectiveness of Image Quality Assessment Indexes
PDF
Introduction to Kernel Functions
PDF
About Perception and Hue Histograms in HSV Space
PDF
Color Harmonization - Results
PDF
Wave Simulation Using Perlin Noise
PDF
Similarity Maps Using SSIM Index
PDF
Qualifying Exam - Image-Based Reconstruction With Color Harmonization
PDF
Month Presentations Schedule - March/2015 - LCG/UFRJ
PDF
Color Palettes in R
PDF
Sigmoid Curve Erf
PDF
Hue Wheel Prototype
PDF
Cosine Curve
PDF
Triangle Mesh Plot
PDF
Triangle Plot
PDF
Capacity-Constrained Point Distributions :: Complementary Results
PDF
Capacity-Constrained Point Distributions
PDF
Five Minute Speech: An Overview of Activities Developed in Disciplines and Gu...
Texture Synthesis: An Approach Based on GPU Use
Intelligent Transfer of Thematic Harmonic Color Palettes
A Framework for Harmonic Color Measures
Effectiveness of Image Quality Assessment Indexes
Introduction to Kernel Functions
About Perception and Hue Histograms in HSV Space
Color Harmonization - Results
Wave Simulation Using Perlin Noise
Similarity Maps Using SSIM Index
Qualifying Exam - Image-Based Reconstruction With Color Harmonization
Month Presentations Schedule - March/2015 - LCG/UFRJ
Color Palettes in R
Sigmoid Curve Erf
Hue Wheel Prototype
Cosine Curve
Triangle Mesh Plot
Triangle Plot
Capacity-Constrained Point Distributions :: Complementary Results
Capacity-Constrained Point Distributions
Five Minute Speech: An Overview of Activities Developed in Disciplines and Gu...

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
GDM (1) (1).pptx small presentation for students
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
O5-L3 Freight Transport Ops (International) V1.pdf
A systematic review of self-coping strategies used by university students to ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
Final Presentation General Medicine 03-08-2024.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Supply Chain Operations Speaking Notes -ICLT Program
01-Introduction-to-Information-Management.pdf
Final Presentation General Medicine 03-08-2024.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Computing-Curriculum for Schools in Ghana
FourierSeries-QuestionsWithAnswers(Part-A).pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS

Documentation - Element and ElementVector

  • 1. Reference Manual Generated by Doxygen 1.6.3 Mon Dec 5 12:55:58 2011
  • 2. Contents 1 1 1.1 2 Class Index 1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1 3 File Index 3 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Class Documentation 5 3.1 Element Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . 5 3.1.2.1 Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.1.2.2 ∼Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.3.1 operator< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.3.2 operator<= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.3.3 operator> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.1.3.4 value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.3.5 value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 ElementVector Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2.2 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . 8 3.2.2.1 ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2.2.2 ∼ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2.3.1 absMaxValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2.3.2 add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2.3.3 at . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2.3.4 clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2.3.5 isEmpty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.3 3.2 3.2.3
  • 3. ii CONTENTS 3.2.3.6 minValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.3.8 operator[] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.3.9 push_back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.3.10 resize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.3.11 size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.3.12 sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.3.13 swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 PredicateSort Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.2.1 4 10 3.2.3.7 3.3 maxValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 operator() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Documentation 15 4.1 Element.cxx File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 Element.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.3 Element.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.4 Element.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.5 Sys-Element.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.5.1 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.5.1.1 main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Sys-Element.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.6 Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 4. Chapter 1 Class Index 1.1 Class List Here are the classes, structs, unions and interfaces with brief descriptions: Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ElementVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PredicateSort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 8 13
  • 5. 2 Class Index Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 6. Chapter 2 File Index 2.1 File List Here is a list of all files with brief descriptions: Element.cxx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Element.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sys-Element.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 17 20
  • 7. 4 File Index Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 8. Chapter 3 Class Documentation 3.1 Element Class Reference #include <Element.h> Public Member Functions • • • • • • • Element (long double value=0.0) void value (long double Value) long double value (void) bool operator> (Element &e) bool operator< (Element &e) bool operator<= (Element &e) virtual ∼Element () 3.1.1 Detailed Description Classe para armazenamento das caracteristicas de um determinado elemento Definition at line 18 of file Element.h. 3.1.2 Constructor & Destructor Documentation 3.1.2.1 Element::Element (long double value = 0.0) [inline] Método construtor da classe. Definition at line 30 of file Element.h. 00030 {_value = value;}; Here is the call graph for this function: Element::Element Element::value
  • 9. 6 3.1.2.2 Class Documentation virtual Element::∼Element () [inline, virtual] Método destrutor. Responsável por liberar todos os recursos alocados pela classe. Definition at line 61 of file Element.h. 00061 {}; 3.1.3 Member Function Documentation 3.1.3.1 bool Element::operator< (Element & e) [inline] Sobrecarga do operador < para simplificação da comparação de valores. Definition at line 50 of file Element.h. 00050 { return (this->value() < e.value()); }; Here is the call graph for this function: Element::operator< 3.1.3.2 Element::value bool Element::operator<= (Element & e) [inline] Sobrecarga do operador <= para simplificação da comparação de valores. Definition at line 55 of file Element.h. 00055 { return (this->value() <= e.value()); }; Here is the call graph for this function: Element::operator<= 3.1.3.3 Element::value bool Element::operator> (Element & e) [inline] Sobrecarga do operador > para simplificação da comparação de valores. Definition at line 45 of file Element.h. 00045 { return (this->value() > e.value()); }; Here is the call graph for this function: Element::operator> Element::value Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 10. 3.1 Element Class Reference 3.1.3.4 7 long double Element::value (void) [inline] Método que retorna o valor contido no atributo value. Definition at line 40 of file Element.h. 00040 { return _value; }; Here is the caller graph for this function: Element::Element Element::operator< Element::value Element::operator<= Element::operator> 3.1.3.5 void Element::value (long double Value) [inline] Método que atribui um valor ao atributo value. Definition at line 35 of file Element.h. 00035 { _value = Value; }; Here is the caller graph for this function: main ElementVector::maxValue ElementVector::absMaxValue ElementVector::minValue Element::value Element::operator< Element::operator<= Element::operator> The documentation for this class was generated from the following file: • Element.h Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 11. 8 Class Documentation 3.2 ElementVector Class Reference #include <Element.h> Public Member Functions • • • • • • • • • • • • • • • ElementVector (void) long double maxValue (void) long double minValue (void) long double absMaxValue (void) bool isEmpty (void) void resize (unsigned int new_size) void sort (void) unsigned int size (void) Element at (unsigned int index) Element & operator[ ] (unsigned int index) void push_back (Element e) void add (Element e) void swap (unsigned int position_a, unsigned int position_b) void clear (void) virtual ∼ElementVector () 3.2.1 Detailed Description Classe para armazenamento de uma lista de elementos Definition at line 76 of file Element.h. 3.2.2 Constructor & Destructor Documentation 3.2.2.1 ElementVector::ElementVector (void) [inline] Método construtor da classe. Definition at line 88 of file Element.h. 00088 {}; 3.2.2.2 virtual ElementVector::∼ElementVector () [inline, virtual] Método destrutor. Responsável por liberar todos os recursos alocados pela classe. Definition at line 163 of file Element.h. 00163 { clear(); } Here is the call graph for this function: ElementVector::~ElementVector ElementVector::clear Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 12. 3.2 ElementVector Class Reference 9 3.2.3 Member Function Documentation 3.2.3.1 long double ElementVector::absMaxValue (void) Método que retorna o maior valor absoluto contido na lista. Definition at line 54 of file Element.cxx. 00055 { 00056 return (fabsl(maxValue()) > fabsl(minValue()))?(maxValue()):(fabsl(minValue())) ; 00057 } Here is the call graph for this function: ElementVector::maxValue ElementVector::at ElementVector::minValue Element::value ElementVector::absMaxValue 3.2.3.2 void ElementVector::add (Element e) [inline] Método que insere elementos na lista Definition at line 146 of file Element.h. 00146 { this->push_back(e); } Here is the call graph for this function: ElementVector::add ElementVector::push_back Here is the caller graph for this function: ElementVector::add 3.2.3.3 main Element ElementVector::at (unsigned int index) [inline] Método que retorna o elemento de uma determinada posição Definition at line 128 of file Element.h. 00128 { return _list.at(index); }; Here is the caller graph for this function: ElementVector::maxValue ElementVector::at ElementVector::absMaxValue ElementVector::minValue Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 13. 10 3.2.3.4 Class Documentation void ElementVector::clear (void) [inline] Método que executa limpeza da lista de elementos Definition at line 157 of file Element.h. 00157 { _list.clear(); } Here is the caller graph for this function: ElementVector::clear 3.2.3.5 ElementVector::~ElementVector bool ElementVector::isEmpty (void) [inline] Método que verifica se a alista está vazia Definition at line 108 of file Element.h. 00108 { return _list.empty(); }; 3.2.3.6 long double ElementVector::maxValue (void) Método que retorna o maior valor existente na lista de elementos Definition at line 13 of file Element.cxx. 00014 { 00015 //Verificando se a lista foi preenchida ... 00016 if (_list.size() == 0 ) return 0; 00017 00018 //Resgatando o primeiro elemento da lista para verificação do maior elemento 00019 long double maximo = at(0).value(); 00020 00021 //Looping para verificação do maior elemento 00022 for (unsigned int index = 1; index < _list.size(); index++) 00023 { 00024 if (maximo < at(index).value()) maximo = at(index).value(); 00025 } 00026 00027 //Retornando o maior valor da lista 00028 return maximo; 00029 } Here is the call graph for this function: ElementVector::at ElementVector::maxValue Element::value Here is the caller graph for this function: ElementVector::maxValue ElementVector::absMaxValue Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 14. 3.2 ElementVector Class Reference 3.2.3.7 11 long double ElementVector::minValue (void) Método que retorna o menor valor existente na lista de elementos Definition at line 33 of file Element.cxx. 00034 { 00035 //Verificando se a lista foi preenchida ... 00036 if (_list.size() == 0 ) return 0; 00037 00038 //Resgatando o primeiro elemento da lista para verificação do maior elemento 00039 long double minimo = at(0).value(); 00040 00041 //Looping para verificação do maior elemento 00042 for (unsigned int index = 1; index < _list.size(); index++) 00043 { 00044 if (minimo > at(index).value()) minimo = at(index).value(); 00045 } 00046 00047 //Retornando o maior valor da lista 00048 return minimo; 00049 } Here is the call graph for this function: ElementVector::at ElementVector::minValue Element::value Here is the caller graph for this function: ElementVector::minValue 3.2.3.8 ElementVector::absMaxValue Element& ElementVector::operator[ ] (unsigned int index) [inline] Sobrecarga do operador [] para simplificar o acesso a um determinado elemento. Lembrando que esse operador devolve uma referência, o que faz que acessemos diretamente o valor do objeto, além disso não executamos verificação de limites com esse operador, isso fica a cargo do programador. Definition at line 136 of file Element.h. 00136 { return _list[index]; }; 3.2.3.9 void ElementVector::push_back (Element e) [inline] Método que insere elementos na lista Definition at line 141 of file Element.h. 00141 { _list.push_back(e); } Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 15. 12 Class Documentation Here is the caller graph for this function: ElementVector::push_back 3.2.3.10 ElementVector::add main void ElementVector::resize (unsigned int new_size) [inline] Método que executa um resize na lista de elementos Definition at line 113 of file Element.h. 00113 { _list.resize(new_size); }; 3.2.3.11 unsigned int ElementVector::size (void) [inline] Método que retorna o tamanho da lista de elementos Definition at line 123 of file Element.h. 00123 { return _list.size(); } Here is the caller graph for this function: ElementVector::size 3.2.3.12 main void ElementVector::sort (void) [inline] Método que utiliza o algoritmo de ordenação quick sort fornecido pela STL Definition at line 118 of file Element.h. 00118 { std::sort(_list.begin(), _list.end(), PredicateSort()); }; 3.2.3.13 void ElementVector::swap (unsigned int position_a, unsigned int position_b) Método que executa a troca entre dois valores de uma determinada posição dentro da lista de elementos. Definition at line 63 of file Element.cxx. 00064 { 00065 //Executa a troca dos valores 00066 long double temp = _list[position_a].value(); 00067 _list[position_a].value( _list[position_b].value() ); 00068 _list[position_b].value(temp); 00069 } The documentation for this class was generated from the following files: • Element.h • Element.cxx Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 16. 3.3 PredicateSort Struct Reference 3.3 PredicateSort Struct Reference #include <Element.h> Public Member Functions • bool operator() (Element a, Element b) 3.3.1 Detailed Description Estrutura auxiliar usada como predicado para executar ordenação usando o quicksort interno da STL. Definition at line 68 of file Element.h. 3.3.2 Member Function Documentation 3.3.2.1 bool PredicateSort::operator() (Element a, Element b) [inline] Definition at line 70 of file Element.h. 00070 { return a < b; } The documentation for this struct was generated from the following file: • Element.h Generated on Mon Dec 5 12:55:58 2011 by Doxygen 13
  • 17. 14 Class Documentation Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 18. Chapter 4 File Documentation 4.1 Element.cxx File Reference #include "Element.h" #include <vector> #include <cmath> #include <algorithm> Include dependency graph for Element.cxx: Element.cxx vector cmath algorithm This graph shows which files directly or indirectly include this file: Element.cxx
  • 19. 16 4.2 00001 00002 00003 00004 00005 00006 00007 00008 00009 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00054 00055 00056 File Documentation Element.cxx /* * _Element.cpp * * Created on: 25/10/2009 Author: Administrador * */ #include "Element.h" long double ElementVector::maxValue(void) { //Verificando se a lista foi preenchida ... if (_list.size() == 0 ) return 0; //Resgatando o primeiro elemento da lista para verificação do maior elemento long double maximo = at(0).value(); //Looping para verificação do maior elemento for (unsigned int index = 1; index < _list.size(); index++) { if (maximo < at(index).value()) maximo = at(index).value(); } //Retornando o maior valor da lista return maximo; } long double ElementVector::minValue(void) { //Verificando se a lista foi preenchida ... if (_list.size() == 0 ) return 0; //Resgatando o primeiro elemento da lista para verificação do maior elemento long double minimo = at(0).value(); //Looping para verificação do maior elemento for (unsigned int index = 1; index < _list.size(); index++) { if (minimo > at(index).value()) minimo = at(index).value(); } //Retornando o maior valor da lista return minimo; } long double ElementVector::absMaxValue(void) { return (fabsl(maxValue()) > fabsl(minValue()))?(maxValue()):(fabsl(minValue())) ; 00057 } 00058 00063 void ElementVector::swap(unsigned int position_a, unsigned int position_b) 00064 { 00065 //Executa a troca dos valores 00066 long double temp = _list[position_a].value(); 00067 _list[position_a].value( _list[position_b].value() ); 00068 _list[position_b].value(temp); 00069 } 00070 00071 Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 20. 4.3 Element.h File Reference 4.3 17 Element.h File Reference #include <vector> #include <cmath> #include <algorithm> Include dependency graph for Element.h: Element.h vector cmath algorithm This graph shows which files directly or indirectly include this file: Element.h Sys-Element.cpp Classes • class Element • struct PredicateSort • class ElementVector Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 21. 18 4.4 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00018 00019 00023 00024 00025 00026 00030 00031 00035 00036 00040 00041 00045 00046 00050 00051 00055 00056 00061 00062 00063 00068 00069 00070 00071 00072 00076 00077 00081 00082 00083 00084 00088 00089 00093 00094 00098 00099 00103 00104 00108 00109 00113 00114 00118 00119 00123 00124 00128 00129 00136 File Documentation Element.h /* * Element.h * * Created on: 25/10/2009 * Author: Michel Alves dos Santos */ #ifndef _ELEMENT_H_ #define _ELEMENT_H_ #include <vector> #include <cmath> #include <algorithm> class Element { long double _value; public : Element(long double value = 0.0){_value = value;}; void value(long double Value) { _value = Value; }; long double value(void) { return _value; }; bool operator > (Element& e) { return (this->value() > e.value()); }; bool operator < (Element& e) { return (this->value() < e.value()); }; bool operator <= (Element& e) { return (this->value() <= e.value()); }; virtual ~Element() {}; }; struct PredicateSort { bool operator()(Element a, Element b) { return a < b; } }; class ElementVector { std::vector<Element> _list; public: ElementVector(void){}; long double maxValue(void); long double minValue(void); long double absMaxValue(void); bool isEmpty(void) { return _list.empty(); }; void resize(unsigned int new_size) { _list.resize(new_size); }; void sort(void) { std::sort(_list.begin(), _list.end(), PredicateSort()); }; unsigned int size(void) { return _list.size(); } Element at(unsigned int index) { return _list.at(index); }; Element& operator [](unsigned int index) { return _list[index]; }; Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 22. 4.4 Element.h 00137 00141 void push_back(Element e) { _list.push_back(e); } 00142 00146 void add(Element e) { this->push_back(e); } 00147 00152 void swap(unsigned int position_a, unsigned int position_b); 00153 00157 void clear(void) { _list.clear(); } 00158 00163 virtual ~ElementVector(){ clear(); } 00164 }; 00165 00166 #endif /* _ELEMENT_H_ */ Generated on Mon Dec 5 12:55:58 2011 by Doxygen 19
  • 23. 20 File Documentation 4.5 Sys-Element.cpp File Reference #include <iostream> #include "Element.h" Include dependency graph for Sys-Element.cpp: Sys-Element.cpp iostream Element.h vector cmath algorithm Functions • int main (int argc, char ∗argv[ ]) 4.5.1 Function Documentation 4.5.1.1 int main (int argc, char ∗ argv[ ]) Função para testes com a biblioteca. Definition at line 13 of file Sys-Element.cpp. 00014 { 00015 Element e(10.5); 00016 ElementVector ev; 00017 00018 ev.add(e); ev.add(Element(11.15)); ev.add(Element(9.5)); 00019 00020 std::cout << "Valor armazenado: " << e.value() << std::endl; 00021 std::cout << "Número de elementos na lista: " << ev.size() << std::endl; 00022 00023 return 0; 00024 } Here is the call graph for this function: ElementVector::add main ElementVector::push_back ElementVector::size Element::value Generated on Mon Dec 5 12:55:58 2011 by Doxygen
  • 24. 4.6 Sys-Element.cpp 4.6 00001 00002 00003 00004 00005 00006 00007 00008 00009 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 Sys-Element.cpp //============================================================================ // Name : Sys-Element // Author : Michel Alves dos Santos // Version : 1.00 Beta //============================================================================ #include <iostream> #include "Element.h" int main(int argc, char* argv[]) { Element e(10.5); ElementVector ev; ev.add(e); ev.add(Element(11.15)); ev.add(Element(9.5)); std::cout << "Valor armazenado: " << e.value() << std::endl; std::cout << "Número de elementos na lista: " << ev.size() << std::endl; return 0; } Generated on Mon Dec 5 12:55:58 2011 by Doxygen 21
  • 25. Index ∼Element Element, 5 ∼ElementVector ElementVector, 8 absMaxValue ElementVector, 9 add ElementVector, 9 at ElementVector, 9 ElementVector, 10 minValue ElementVector, 10 operator< Element, 6 operator<= Element, 6 operator> Element, 6 operator() PredicateSort, 13 clear ElementVector, 9 Element, 5 ∼Element, 5 Element, 5 operator<, 6 operator<=, 6 operator>, 6 value, 6, 7 Element.cxx, 15 Element.h, 17 ElementVector, 8 ∼ElementVector, 8 absMaxValue, 9 add, 9 at, 9 clear, 9 ElementVector, 8 isEmpty, 10 maxValue, 10 minValue, 10 push_back, 11 resize, 12 size, 12 sort, 12 swap, 12 isEmpty ElementVector, 10 main Sys-Element.cpp, 20 maxValue PredicateSort, 13 operator(), 13 push_back ElementVector, 11 resize ElementVector, 12 size ElementVector, 12 sort ElementVector, 12 swap ElementVector, 12 Sys-Element.cpp, 20 main, 20 value Element, 6, 7