Wondercoll
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions
cxdatastructs.cpp File Reference
#include "_cxcore.h"

Classes

struct  CvSeqReaderPos
 
struct  CvPTreeNode
 
struct  CvGraphItem
 
struct  CvTreeNode
 

Macros

#define ICV_FREE_PTR(storage)   ((schar*)(storage)->top + (storage)->block_size - (storage)->free_space)
 
#define ICV_ALIGNED_SEQ_BLOCK_SIZE   (int)cvAlign(sizeof(CvSeqBlock), CV_STRUCT_ALIGN)
 
#define CV_GET_LAST_ELEM(seq, block)   ((block)->data + ((block)->count - 1)*((seq)->elem_size))
 
#define CV_SWAP_ELEMS(a, b, elem_size)
 
#define ICV_SHIFT_TAB_MAX   32
 
#define CV_SAVE_READER_POS(reader, pos)
 
#define CV_RESTORE_READER_POS(reader, pos)
 
#define CV_FIELD_OFFSET(field, structtype)   ((int)(size_t)&((structtype*)0)->field)
 

Typedefs

typedef struct CvSeqReaderPos CvSeqReaderPos
 
typedef struct CvPTreeNode CvPTreeNode
 
typedef struct CvGraphItem CvGraphItem
 
typedef struct CvTreeNode CvTreeNode
 

Functions

CV_INLINE int cvAlignLeft (int size, int align)
 
CV_IMPL CvMemStoragecvCreateMemStorage (int block_size)
 
CV_IMPL CvMemStoragecvCreateChildMemStorage (CvMemStorage *parent)
 
CV_IMPL void cvReleaseMemStorage (CvMemStorage **storage)
 
CV_IMPL void cvClearMemStorage (CvMemStorage *storage)
 
CV_IMPL void cvSaveMemStoragePos (const CvMemStorage *storage, CvMemStoragePos *pos)
 
CV_IMPL void cvRestoreMemStoragePos (CvMemStorage *storage, CvMemStoragePos *pos)
 
CV_IMPL void * cvMemStorageAlloc (CvMemStorage *storage, size_t size)
 
CV_IMPL CvString cvMemStorageAllocString (CvMemStorage *storage, const char *ptr, int len)
 
CV_IMPL CvSeqcvCreateSeq (int seq_flags, int header_size, int elem_size, CvMemStorage *storage)
 
CV_IMPL void cvSetSeqBlockSize (CvSeq *seq, int delta_elements)
 
CV_IMPL scharcvGetSeqElem (const CvSeq *seq, int index)
 
CV_IMPL int cvSeqElemIdx (const CvSeq *seq, const void *_element, CvSeqBlock **_block)
 
CV_IMPL int cvSliceLength (CvSlice slice, const CvSeq *seq)
 
CV_IMPL void * cvCvtSeqToArray (const CvSeq *seq, void *array, CvSlice slice)
 
CV_IMPL CvSeqcvMakeSeqHeaderForArray (int seq_flags, int header_size, int elem_size, void *array, int total, CvSeq *seq, CvSeqBlock *block)
 
CV_IMPL void cvStartAppendToSeq (CvSeq *seq, CvSeqWriter *writer)
 
CV_IMPL void cvStartWriteSeq (int seq_flags, int header_size, int elem_size, CvMemStorage *storage, CvSeqWriter *writer)
 
CV_IMPL void cvFlushSeqWriter (CvSeqWriter *writer)
 
CV_IMPL CvSeqcvEndWriteSeq (CvSeqWriter *writer)
 
CV_IMPL void cvCreateSeqBlock (CvSeqWriter *writer)
 
CV_IMPL void cvStartReadSeq (const CvSeq *seq, CvSeqReader *reader, int reverse)
 
CV_IMPL void cvChangeSeqBlock (void *_reader, int direction)
 
CV_IMPL int cvGetSeqReaderPos (CvSeqReader *reader)
 
CV_IMPL void cvSetSeqReaderPos (CvSeqReader *reader, int index, int is_relative)
 
CV_IMPL scharcvSeqPush (CvSeq *seq, void *element)
 
CV_IMPL void cvSeqPop (CvSeq *seq, void *element)
 
CV_IMPL scharcvSeqPushFront (CvSeq *seq, void *element)
 
CV_IMPL void cvSeqPopFront (CvSeq *seq, void *element)
 
CV_IMPL scharcvSeqInsert (CvSeq *seq, int before_index, void *element)
 
CV_IMPL void cvSeqRemove (CvSeq *seq, int index)
 
CV_IMPL void cvSeqPushMulti (CvSeq *seq, void *_elements, int count, int front)
 
CV_IMPL void cvSeqPopMulti (CvSeq *seq, void *_elements, int count, int front)
 
CV_IMPL void cvClearSeq (CvSeq *seq)
 
CV_IMPL CvSeqcvSeqSlice (const CvSeq *seq, CvSlice slice, CvMemStorage *storage, int copy_data)
 
CV_IMPL void cvSeqRemoveSlice (CvSeq *seq, CvSlice slice)
 
CV_IMPL void cvSeqInsertSlice (CvSeq *seq, int index, const CvArr *from_arr)
 
scharicvMed3 (schar *a, schar *b, schar *c, CvCmpFunc cmp_func, void *aux)
 
CV_IMPL void cvSeqSort (CvSeq *seq, CvCmpFunc cmp_func, void *aux)
 
CV_IMPL scharcvSeqSearch (CvSeq *seq, const void *_elem, CvCmpFunc cmp_func, int is_sorted, int *_idx, void *userdata)
 
CV_IMPL void cvSeqInvert (CvSeq *seq)
 
CV_IMPL int cvSeqPartition (const CvSeq *seq, CvMemStorage *storage, CvSeq **labels, CvCmpFunc is_equal, void *userdata)
 
CV_IMPL CvSetcvCreateSet (int set_flags, int header_size, int elem_size, CvMemStorage *storage)
 
CV_IMPL int cvSetAdd (CvSet *set, CvSetElem *element, CvSetElem **inserted_element)
 
CV_IMPL void cvSetRemove (CvSet *set, int index)
 
CV_IMPL void cvClearSet (CvSet *set)
 
CV_IMPL CvGraphcvCreateGraph (int graph_type, int header_size, int vtx_size, int edge_size, CvMemStorage *storage)
 
CV_IMPL void cvClearGraph (CvGraph *graph)
 
CV_IMPL int cvGraphAddVtx (CvGraph *graph, const CvGraphVtx *_vertex, CvGraphVtx **_inserted_vertex)
 
CV_IMPL int cvGraphRemoveVtxByPtr (CvGraph *graph, CvGraphVtx *vtx)
 
CV_IMPL int cvGraphRemoveVtx (CvGraph *graph, int index)
 
CV_IMPL CvGraphEdgecvFindGraphEdgeByPtr (const CvGraph *graph, const CvGraphVtx *start_vtx, const CvGraphVtx *end_vtx)
 
CV_IMPL CvGraphEdgecvFindGraphEdge (const CvGraph *graph, int start_idx, int end_idx)
 
CV_IMPL int cvGraphAddEdgeByPtr (CvGraph *graph, CvGraphVtx *start_vtx, CvGraphVtx *end_vtx, const CvGraphEdge *_edge, CvGraphEdge **_inserted_edge)
 
CV_IMPL int cvGraphAddEdge (CvGraph *graph, int start_idx, int end_idx, const CvGraphEdge *_edge, CvGraphEdge **_inserted_edge)
 
CV_IMPL void cvGraphRemoveEdgeByPtr (CvGraph *graph, CvGraphVtx *start_vtx, CvGraphVtx *end_vtx)
 
CV_IMPL void cvGraphRemoveEdge (CvGraph *graph, int start_idx, int end_idx)
 
CV_IMPL int cvGraphVtxDegreeByPtr (const CvGraph *graph, const CvGraphVtx *vertex)
 
CV_IMPL int cvGraphVtxDegree (const CvGraph *graph, int vtx_idx)
 
CV_IMPL CvGraphScannercvCreateGraphScanner (CvGraph *graph, CvGraphVtx *vtx, int mask)
 
CV_IMPL void cvReleaseGraphScanner (CvGraphScanner **scanner)
 
CV_IMPL int cvNextGraphItem (CvGraphScanner *scanner)
 
CV_IMPL CvGraphcvCloneGraph (const CvGraph *graph, CvMemStorage *storage)
 
CV_IMPL CvSeqcvTreeToNodeSeq (const void *first, int header_size, CvMemStorage *storage)
 
CV_IMPL void cvInsertNodeIntoTree (void *_node, void *_parent, void *_frame)
 
CV_IMPL void cvRemoveNodeFromTree (void *_node, void *_frame)
 
CV_IMPL void cvInitTreeNodeIterator (CvTreeNodeIterator *treeIterator, const void *first, int max_level)
 
CV_IMPL void * cvNextTreeNode (CvTreeNodeIterator *treeIterator)
 
CV_IMPL void * cvPrevTreeNode (CvTreeNodeIterator *treeIterator)
 

Macro Definition Documentation

#define CV_FIELD_OFFSET (   field,
  structtype 
)    ((int)(size_t)&((structtype*)0)->field)
#define CV_GET_LAST_ELEM (   seq,
  block 
)    ((block)->data + ((block)->count - 1)*((seq)->elem_size))
#define CV_RESTORE_READER_POS (   reader,
  pos 
)
Value:
{ \
(reader).block = (pos).block; \
(reader).ptr = (pos).ptr; \
(reader).block_min = (pos).block_min; \
(reader).block_max = (pos).block_max; \
}
#define CV_SAVE_READER_POS (   reader,
  pos 
)
Value:
{ \
(pos).block = (reader).block; \
(pos).ptr = (reader).ptr; \
(pos).block_min = (reader).block_min; \
(pos).block_max = (reader).block_max; \
}
#define CV_SWAP_ELEMS (   a,
  b,
  elem_size 
)
Value:
{ \
int k; \
for( k = 0; k < elem_size; k++ ) \
{ \
char t0 = (a)[k]; \
char t1 = (b)[k]; \
(a)[k] = t1; \
(b)[k] = t0; \
} \
}
#define ICV_ALIGNED_SEQ_BLOCK_SIZE   (int)cvAlign(sizeof(CvSeqBlock), CV_STRUCT_ALIGN)
#define ICV_FREE_PTR (   storage)    ((schar*)(storage)->top + (storage)->block_size - (storage)->free_space)
#define ICV_SHIFT_TAB_MAX   32

Typedef Documentation

typedef struct CvGraphItem CvGraphItem
typedef struct CvPTreeNode CvPTreeNode
typedef struct CvTreeNode CvTreeNode

Function Documentation

CV_INLINE int cvAlignLeft ( int  size,
int  align 
)
CV_IMPL void cvChangeSeqBlock ( void *  _reader,
int  direction 
)
CV_IMPL void cvClearGraph ( CvGraph graph)
CV_IMPL void cvClearMemStorage ( CvMemStorage storage)
CV_IMPL void cvClearSeq ( CvSeq seq)
CV_IMPL void cvClearSet ( CvSet set)
CV_IMPL CvGraph* cvCloneGraph ( const CvGraph graph,
CvMemStorage storage 
)
CV_IMPL CvMemStorage* cvCreateChildMemStorage ( CvMemStorage parent)
CV_IMPL CvGraph* cvCreateGraph ( int  graph_type,
int  header_size,
int  vtx_size,
int  edge_size,
CvMemStorage storage 
)
CV_IMPL CvGraphScanner* cvCreateGraphScanner ( CvGraph graph,
CvGraphVtx vtx,
int  mask 
)
CV_IMPL CvMemStorage* cvCreateMemStorage ( int  block_size)
CV_IMPL CvSeq* cvCreateSeq ( int  seq_flags,
int  header_size,
int  elem_size,
CvMemStorage storage 
)
CV_IMPL void cvCreateSeqBlock ( CvSeqWriter writer)
CV_IMPL CvSet* cvCreateSet ( int  set_flags,
int  header_size,
int  elem_size,
CvMemStorage storage 
)
CV_IMPL void* cvCvtSeqToArray ( const CvSeq seq,
void *  array,
CvSlice  slice 
)
CV_IMPL CvSeq* cvEndWriteSeq ( CvSeqWriter writer)
CV_IMPL CvGraphEdge* cvFindGraphEdge ( const CvGraph graph,
int  start_idx,
int  end_idx 
)
CV_IMPL CvGraphEdge* cvFindGraphEdgeByPtr ( const CvGraph graph,
const CvGraphVtx start_vtx,
const CvGraphVtx end_vtx 
)
CV_IMPL void cvFlushSeqWriter ( CvSeqWriter writer)
CV_IMPL schar* cvGetSeqElem ( const CvSeq seq,
int  index 
)
CV_IMPL int cvGetSeqReaderPos ( CvSeqReader reader)
CV_IMPL int cvGraphAddEdge ( CvGraph graph,
int  start_idx,
int  end_idx,
const CvGraphEdge _edge,
CvGraphEdge **  _inserted_edge 
)
CV_IMPL int cvGraphAddEdgeByPtr ( CvGraph graph,
CvGraphVtx start_vtx,
CvGraphVtx end_vtx,
const CvGraphEdge _edge,
CvGraphEdge **  _inserted_edge 
)
CV_IMPL int cvGraphAddVtx ( CvGraph graph,
const CvGraphVtx _vertex,
CvGraphVtx **  _inserted_vertex 
)
CV_IMPL void cvGraphRemoveEdge ( CvGraph graph,
int  start_idx,
int  end_idx 
)
CV_IMPL void cvGraphRemoveEdgeByPtr ( CvGraph graph,
CvGraphVtx start_vtx,
CvGraphVtx end_vtx 
)
CV_IMPL int cvGraphRemoveVtx ( CvGraph graph,
int  index 
)
CV_IMPL int cvGraphRemoveVtxByPtr ( CvGraph graph,
CvGraphVtx vtx 
)
CV_IMPL int cvGraphVtxDegree ( const CvGraph graph,
int  vtx_idx 
)
CV_IMPL int cvGraphVtxDegreeByPtr ( const CvGraph graph,
const CvGraphVtx vertex 
)
CV_IMPL void cvInitTreeNodeIterator ( CvTreeNodeIterator treeIterator,
const void *  first,
int  max_level 
)
CV_IMPL void cvInsertNodeIntoTree ( void *  _node,
void *  _parent,
void *  _frame 
)
CV_IMPL CvSeq* cvMakeSeqHeaderForArray ( int  seq_flags,
int  header_size,
int  elem_size,
void *  array,
int  total,
CvSeq seq,
CvSeqBlock block 
)
CV_IMPL void* cvMemStorageAlloc ( CvMemStorage storage,
size_t  size 
)
CV_IMPL CvString cvMemStorageAllocString ( CvMemStorage storage,
const char *  ptr,
int  len 
)
CV_IMPL int cvNextGraphItem ( CvGraphScanner scanner)
CV_IMPL void* cvNextTreeNode ( CvTreeNodeIterator treeIterator)
CV_IMPL void* cvPrevTreeNode ( CvTreeNodeIterator treeIterator)
CV_IMPL void cvReleaseGraphScanner ( CvGraphScanner **  scanner)
CV_IMPL void cvReleaseMemStorage ( CvMemStorage **  storage)
CV_IMPL void cvRemoveNodeFromTree ( void *  _node,
void *  _frame 
)
CV_IMPL void cvRestoreMemStoragePos ( CvMemStorage storage,
CvMemStoragePos pos 
)
CV_IMPL void cvSaveMemStoragePos ( const CvMemStorage storage,
CvMemStoragePos pos 
)
CV_IMPL int cvSeqElemIdx ( const CvSeq seq,
const void *  _element,
CvSeqBlock **  _block 
)
CV_IMPL schar* cvSeqInsert ( CvSeq seq,
int  before_index,
void *  element 
)
CV_IMPL void cvSeqInsertSlice ( CvSeq seq,
int  index,
const CvArr from_arr 
)
CV_IMPL void cvSeqInvert ( CvSeq seq)
CV_IMPL int cvSeqPartition ( const CvSeq seq,
CvMemStorage storage,
CvSeq **  labels,
CvCmpFunc  is_equal,
void *  userdata 
)
CV_IMPL void cvSeqPop ( CvSeq seq,
void *  element 
)
CV_IMPL void cvSeqPopFront ( CvSeq seq,
void *  element 
)
CV_IMPL void cvSeqPopMulti ( CvSeq seq,
void *  _elements,
int  count,
int  front 
)
CV_IMPL schar* cvSeqPush ( CvSeq seq,
void *  element 
)
CV_IMPL schar* cvSeqPushFront ( CvSeq seq,
void *  element 
)
CV_IMPL void cvSeqPushMulti ( CvSeq seq,
void *  _elements,
int  count,
int  front 
)
CV_IMPL void cvSeqRemove ( CvSeq seq,
int  index 
)
CV_IMPL void cvSeqRemoveSlice ( CvSeq seq,
CvSlice  slice 
)
CV_IMPL schar* cvSeqSearch ( CvSeq seq,
const void *  _elem,
CvCmpFunc  cmp_func,
int  is_sorted,
int _idx,
void *  userdata 
)
CV_IMPL CvSeq* cvSeqSlice ( const CvSeq seq,
CvSlice  slice,
CvMemStorage storage,
int  copy_data 
)
CV_IMPL void cvSeqSort ( CvSeq seq,
CvCmpFunc  cmp_func,
void *  aux 
)
CV_IMPL int cvSetAdd ( CvSet set,
CvSetElem element,
CvSetElem **  inserted_element 
)
CV_IMPL void cvSetRemove ( CvSet set,
int  index 
)
CV_IMPL void cvSetSeqBlockSize ( CvSeq seq,
int  delta_elements 
)
CV_IMPL void cvSetSeqReaderPos ( CvSeqReader reader,
int  index,
int  is_relative 
)
CV_IMPL int cvSliceLength ( CvSlice  slice,
const CvSeq seq 
)
CV_IMPL void cvStartAppendToSeq ( CvSeq seq,
CvSeqWriter writer 
)
CV_IMPL void cvStartReadSeq ( const CvSeq seq,
CvSeqReader reader,
int  reverse 
)
CV_IMPL void cvStartWriteSeq ( int  seq_flags,
int  header_size,
int  elem_size,
CvMemStorage storage,
CvSeqWriter writer 
)
CV_IMPL CvSeq* cvTreeToNodeSeq ( const void *  first,
int  header_size,
CvMemStorage storage 
)
schar* icvMed3 ( schar a,
schar b,
schar c,
CvCmpFunc  cmp_func,
void *  aux 
)