#include "idep_binrel.h"#include <memory.h>#include <iostream>#include <cassert>Go to the source code of this file.
Enumerations | |
| enum | { START_SIZE = 1, GROW_FACTOR = 2 } |
Functions | |
| void | clean (char **p) |
| char ** | alloc (int size) |
| void | clear (char *const *rel, int size) |
| void | copy (char **left, const char *const *right, int size) |
| std::ostream & | operator<< (std::ostream &o, const idep_BinRel &rel) |
|
|
Definition at line 23 of file idep_binrel.cxx. 00023 { START_SIZE = 1, GROW_FACTOR = 2 };
|
|
|
Definition at line 31 of file idep_binrel.cxx. References s(). Referenced by idep_BinRel::compress(), idep_BinRel::grow(), idep_BinRel::idep_BinRel(), and idep_BinRel::operator=(). 00032 {
00033 register int s = size;
00034 char **rel = new char *[s];
00035 register char *p = new char[s * s];
00036 for (register int i = 0; i < s; ++i, p += s) {
00037 rel[i] = p;
00038 }
00039 return rel;
00040 }
|
|
|
Definition at line 25 of file idep_binrel.cxx. Referenced by idep_BinRel::compress(), idep_BinRel::grow(), idep_BinRel::operator=(), and idep_BinRel::~idep_BinRel(). 00026 {
00027 delete [] *p; // only one 2-d block is allocated
00028 delete [] p; // delete single block
00029 }
|
|
||||||||||||
|
Definition at line 42 of file idep_binrel.cxx. Referenced by BeamDataImp::BeamDataImp(), idep_BinRel::compress(), idep_BinRel::grow(), idep_BinRel::idep_BinRel(), PlexSEIdAltL::KeepTopWeights(), and LedIdList::Reset(). 00043 {
00044 memset(*rel, 0, size * size);
00045 }
|
|
||||||||||||||||
|
Definition at line 47 of file idep_binrel.cxx. Referenced by AltAlgSliceList::checkPeakUVDifference(), AltAlgSliceList::computeSliceCentroid(), HoughView::DrawChains(), HitView::DrawChains(), ChainView::DrawChains(), LIPatternFinderSimple::GetEWAsymmetry(), idep_BinRel::idep_BinRel(), idep_BinRel::operator=(), OltNewModule::ProcessTimeframe(), OltNewModule::Reco(), Anp::RunkNN::Run(), AltAlgSliceList::Split(), and AltAlgSliceList::ZeroChargeInAView(). 00048 {
00049 memcpy(*left, *right, size * size);
00050 }
|
|
||||||||||||
|
Definition at line 208 of file idep_binrel.cxx. 00209 {
00210 int r, c;
00211 const int GAP_GRID = 10;
00212 const char *SP = rel.length() < 30 ? " " : "";
00213 for (r = 0; r < rel.length(); ++r) {
00214 if (r && 0 == r % GAP_GRID) {
00215 o << std::endl;
00216 }
00217
00218 for (c = 0; c < rel.length(); ++c) {
00219 if (c && 0 == c % GAP_GRID) {
00220 o << ' ' << SP;
00221 }
00222 o << (rel.get(r,c) ? '1' : '_') << SP;
00223 }
00224 o << std::endl;
00225 }
00226 return o;
00227 }
|
1.3.9.1