Garfield++ 5.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::IterDynArr< T > Class Template Reference

#include <AbsArr.h>

Public Member Functions

 IterDynArr (const DynArr< T > *fdar)
 
T * more (void)
 
T * current (void)
 
T * less (void)
 
const DynLinArr< long > & get_ncur (void) const
 

Detailed Description

template<class T>
class Heed::IterDynArr< T >

Definition at line 2339 of file AbsArr.h.

Constructor & Destructor Documentation

◆ IterDynArr()

template<class T>
Heed::IterDynArr< T >::IterDynArr ( const DynArr< T > * fdar)
inline

Definition at line 2341 of file AbsArr.h.

2342 : ncur(fdar->get_qdim()), dar((DynArr<T>*)fdar) {
2343 long n;
2344 long qdim1 = ncur.get_qel() - 1;
2345 if (qdim1 >= 0) {
2346 for (n = 0; n < qdim1; n++) ncur[n] = 0;
2347 ncur[qdim1] = -1;
2348 }
2349 }

Member Function Documentation

◆ current()

template<class T>
T * Heed::IterDynArr< T >::current ( void )
inline

Definition at line 2358 of file AbsArr.h.

2359 {
2360 long n;
2361 long qdim = ncur.get_qel();
2362 if (qdim <= 0) return NULL;
2363 for (n = 0; n < qdim; n++) {
2364 if (ncur[n] < 0 || ncur[n] >= dar->get_qel()[n]) return NULL;
2365 }
2366 return &(dar->ac(ncur));
2367 }

◆ get_ncur()

template<class T>
const DynLinArr< long > & Heed::IterDynArr< T >::get_ncur ( void ) const
inline

◆ less()

template<class T>
T * Heed::IterDynArr< T >::less ( void )
inline

Definition at line 2369 of file AbsArr.h.

2371 {
2372 if (find_prev_comb(dar->get_qel(), ncur))
2373 return &(dar->ac(ncur));
2374 else
2375 return NULL;
2376 }
int find_prev_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
Definition AbsArr.cpp:501

◆ more()

template<class T>
T * Heed::IterDynArr< T >::more ( void )
inline

Definition at line 2350 of file AbsArr.h.

2351 {
2352 if (find_next_comb(dar->get_qel(), ncur))
2353 return &(dar->ac(ncur));
2354 else
2355 return NULL;
2356 }
int find_next_comb(const DynLinArr< long > &qel, DynLinArr< long > &f)
Definition AbsArr.cpp:450

Referenced by Heed::convert_DynArr(), Heed::copy_DynArr(), Heed::operator+(), Heed::operator+(), Heed::operator-(), Heed::operator-(), Heed::operator<<(), Heed::print_DynArr(), Heed::print_DynArr_int_w(), and Heed::DynArr< T >::put_qel().


The documentation for this class was generated from the following file: