Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions  Download package

void cbd500_Tree::bd500SetToNodeOnEdge ( bool  leftEdge,
tsp00_Int2  level 
)

function: bd500SetToNodeOnEdge description: The internal node is set to the specified index or leaf node.

Definition at line 758 of file vbd500.cpp.

References bd500SetToRoot(), cbd600_Node::bd600MaxRecIndex(), and cbd600_Node::m_RequestKind.

Referenced by bd500SetToFirstLeaf(), and bd500SetToLastLeaf().

{
    ROUTINE_DBG_MEO00 ("bd500SetToNodeOnEdge");

    const tsp00_Int2 targetLevel = level < 0 || level > MAX_LEVEL_BD00
                                   ? LEAF_LEVEL_BD00 : level;

    bd500_Init     (); // ReInitialize the Tree 
    bd500SetToRoot (); //
    if ( e_ok != m_TrError ) return;

    tbd_node_request TargetRequest = m_Node.m_RequestKind;

    while ( m_CurrLevel > targetLevel)
    {
        if ( leftEdge )
            bd500_NextSubNode (FIRST_REC_INDEX_BD00, targetLevel, TargetRequest);
        else
            bd500_NextSubNode (m_Node.bd600MaxRecIndex(), targetLevel, TargetRequest);
        if ( e_ok != m_TrError ) break;
    }
}


Generated by  Doxygen 1.6.0   Back to index