File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,7 @@ bool SACoreSoftMacro::isValid() const
109109 return false ;
110110 }
111111
112- return (width_ <= std::ceil (outline_.getWidth ()))
113- && (height_ <= std::ceil (outline_.getHeight ()));
112+ return resultFitsInOutline ();
114113}
115114
116115// acessors functions
Original file line number Diff line number Diff line change @@ -153,8 +153,7 @@ void SimulatedAnnealingCore<T>::setInitialSequencePair(
153153template <class T >
154154bool SimulatedAnnealingCore<T>::isValid() const
155155{
156- return (width_ <= std::ceil (outline_.getWidth ()))
157- && (height_ <= std::ceil (outline_.getHeight ()));
156+ return resultFitsInOutline ();
158157}
159158
160159template <class T >
@@ -769,6 +768,13 @@ void SimulatedAnnealingCore<T>::fastSA()
769768 }
770769}
771770
771+ template <class T >
772+ bool SimulatedAnnealingCore<T>::resultFitsInOutline() const
773+ {
774+ return (width_ <= std::ceil (outline_.getWidth ()))
775+ && (height_ <= std::ceil (outline_.getHeight ()));
776+ }
777+
772778template <class T >
773779void SimulatedAnnealingCore<T>::updateBestResult(const float cost)
774780{
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ class SimulatedAnnealingCore
102102 };
103103
104104 void fastSA ();
105+ bool resultFitsInOutline () const ;
105106
106107 void setAvailableRegionsForUnconstrainedPins (
107108 const BoundaryRegionList& regions);
You can’t perform that action at this time.
0 commit comments