pub fn build(&mut self) -> Result<VD::Diagram<I, F>, BvError> {
        let mut output: VD::Diagram<I, F> = VD::Diagram::<I, F>::new(self.site_events_.len());

        let mut site_event_iterator_: VSE::SiteEventIndexType = self.init_sites_queue();

        t!("********************************************************************************");
        tln!("\n->build()");
        tln!("********************************************************************************");

        self.init_beach_line(&mut site_event_iterator_, &mut output)?;
        #[cfg(feature = "console_debug")]
        let mut i = 0;

        // The algorithm stops when there are no events to process.
        while !self.circle_events_.is_empty() || (site_event_iterator_ != self.site_events_.len()) {
            #[cfg(feature = "console_debug")]
            {
                tln!("################################################");
                tln!(
                    "loop:{} circle_events_:{} num_vertices:{} beach_line:{} debug_site_counter:{} debug_circle_counter:{}",
                    i,self.circle_events_.len(),
                    output.num_vertices(),
                    self.beach_line_.len(),
                    self.debug_site_counter_,
                    self.debug_circle_counter_,
                );
                tln!("################################################");
                if i >= 8 {
                    self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
                    print!("");
                }
                i += 1;
            }
            if self.circle_events_.is_empty() {
                self.process_site_event(&mut site_event_iterator_, &mut output)?;
            } else if site_event_iterator_ == self.site_events_.len() {
                self.process_circle_event(&mut output)?;
            } else if VP::EventComparisonPredicate::<I, F>::event_comparison_predicate_bif(
                &self.site_events_[site_event_iterator_],
                // we checked with !is_empty(), unwrap is safe
                &self.circle_events_.peek().unwrap().0.get(),
            ) {
                self.process_site_event(&mut site_event_iterator_, &mut output)?;
            } else {
                self.process_circle_event(&mut output)?;
            }

            self.circle_events_.pop_inactive_at_top()?;
        }

        self.beach_line_.clear();

        // Finish construction.
        output._build();
        Ok(output)
    }
/// Run sweep-line algorithm and fill output data structure.
Run sweep-line algorithm and fill output data structure.
Run sweep - line algorithm and fill output data structure .
pub fn build(&mut self) -> Result<VD::Diagram<I, F>, BvError> {
        let mut output: VD::Diagram<I, F> = VD::Diagram::<I, F>::new(self.site_events_.len());
        let mut site_event_iterator_: VSE::SiteEventIndexType = self.init_sites_queue();
        t!("********************************************************************************");
        tln!("\n->build()");
        tln!("********************************************************************************");
        self.init_beach_line(&mut site_event_iterator_, &mut output)?;
        #[cfg(feature = "console_debug")]
        let mut i = 0;
        // The algorithm stops when there are no events to process.
        while !self.circle_events_.is_empty() || (site_event_iterator_ != self.site_events_.len()) {
            #[cfg(feature = "console_debug")]
            {
                tln!("################################################");
                tln!(
                    "loop:{} circle_events_:{} num_vertices:{} beach_line:{} debug_site_counter:{} debug_circle_counter:{}",
                    i,self.circle_events_.len(),
                    output.num_vertices(),
                    self.beach_line_.len(),
                    self.debug_site_counter_,
                    self.debug_circle_counter_,
                );
                tln!("################################################");
                if i >= 8 {
                    self.beach_line_.dbgpa_compat_(&self.circle_events_)?;
                    print!("");
                }
                i += 1;
            }
            if self.circle_events_.is_empty() {
                self.process_site_event(&mut site_event_iterator_, &mut output)?;
            } else if site_event_iterator_ == self.site_events_.len() {
                self.process_circle_event(&mut output)?;
            } else if VP::EventComparisonPredicate::<I, F>::event_comparison_predicate_bif(
                &self.site_events_[site_event_iterator_],
                // we checked with !is_empty(), unwrap is safe
                &self.circle_events_.peek().unwrap().0.get(),
            ) {
                self.process_site_event(&mut site_event_iterator_, &mut output)?;
            } else {
                self.process_circle_event(&mut output)?;
            }
            self.circle_events_.pop_inactive_at_top()?;
        }
        self.beach_line_.clear();
        // Finish construction.
        output._build();
        Ok(output)
    }
pub fn build ( & mut self ) -> Result < VD :: Diagram < I , F > , BvError > { let mut output : VD :: Diagram < I , F > = VD :: Diagram :: < I , F > :: new ( self . site_events_ . len ( ) ) ; let mut site_event_iterator_ : VSE :: SiteEventIndexType = self . init_sites_queue ( ) ; t ! ( " " ) ; tln ! ( " \n " ) ; tln ! ( " " ) ; self . init_beach_line ( & mut site_event_iterator_ , & mut output ) ? ; # [ cfg ( feature " " ) ] let mut i = 0 ; // The algorithm stops when there are no events to process. while ! self . circle_events_ . is_empty ( ) || ( site_event_iterator_ != self . site_events_ . len ( ) ) { # [ cfg ( feature " " ) ] { tln ! ( " " ) ; tln ! ( " " i self circle_events_ len ( ) output num_vertices ( ) self beach_line_ len ( ) self debug_site_counter_ self debug_circle_counter_ ) ; tln ! ( " " ) ; if i >= 8 { self . beach_line_ . dbgpa_compat_ ( & self . circle_events_ ) ? ; print ! ( " " ) ; } i += 1 ; } if self . circle_events_ . is_empty ( ) { self . process_site_event ( & mut site_event_iterator_ , & mut output ) ? ; } else if site_event_iterator_ == self . site_events_ . len ( ) { self . process_circle_event ( & mut output ) ? ; } else if VP :: EventComparisonPredicate :: < I , F > :: event_comparison_predicate_bif ( & self . site_events_ [ site_event_iterator_ ] , // we checked with !is_empty(), unwrap is safe & self . circle_events_ . peek ( ) . unwrap ( ) . 0 . get ( ) , ) { self . process_site_event ( & mut site_event_iterator_ , & mut output ) ? ; } else { self . process_circle_event ( & mut output ) ? ; } self . circle_events_ . pop_inactive_at_top ( ) ? ; } self . beach_line_ . clear ( ) ; // Finish construction. output . _build ( ) ; Ok ( output ) }
Run sweep-line algorithm and fill output data structure.
Run sweep - line algorithm and fill output data structure .
&mut self