| ¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumdistance. ´Â °¢ ÁöÁ¡¿¡¼ °¡Àå °¡±î¿î ÀÌ¿ô±îÁöÀÇ °Å¸®¸¦ ÀÛµ¿ÇÕ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumdistance. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~kake/
¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumdistance. ű×
¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumdistance. ¼³¸í
°¢ ÁöÁ¡¿¡¼ °¡Àå °¡±î¿î ÀÌ¿ô±îÁöÀÇ °Å¸®¸¦ ÀÛ¿ëÇÕ´Ï´Ù. n Â÷¿ø À¯Å¬¸®µå °ø°£¿¡ Á¡ ÁýÇÕÀÌ ÁÖ¾îÁö¸é °¡Àå °¡±î¿î ÀÌ¿ôÀÌ ¾Æ´Ñ ÇÑ °¡Àå °¡±î¿î ÀÌ¿ô±îÁöÀÇ °Å¸®¿¡ ´ëÇØ °¢ ÁöÁ¡¿¡ ´ëÇØ ÀÛµ¿ÇÕ´Ï´Ù (°¡Àå °¡±î¿î ÀÌ¿ôÀÌ ±×¸® ÈíÀÔÇÏÁö ¾ÊÀ¸¸é). °Å¸® ¸ÞÆ®¸¯Àº ¹æ¹ýÀÔ´Ï´Ù. ¼ºê Ŭ·¡½º ¹× ºñ À¯Å¬¸®µå °ø°£¿¡ ´ëÇÑ ÀçÁ¤ÀÇ. ½Ä ³ëÇÁ ´Ï½º ¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumDistance; ³» @points = (, , ); ³» $ dists = ¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumDistance-> new (points => @points); Foreach My $ Point (@Points) {Print "($ Point -> , $ Point -> : °¡Àå °¡±î¿î ÀÌ¿ô °Å¸®´Â". $ dists-> °Å¸® (Point => $ Point). "\ n ";} Àμâ"µÎ Á¡ »çÀÌÀÇ °¡Àå ÀÛÀº °Å¸®´Â "ÀÔ´Ï´Ù. $ dists -> min_distance."\ n "; ¿ä±¸ »çÇ× : ¡¤ Perl.
¾Ë°í¸®Áò :: Æ÷ÀÎÆ® :: minimumdistance. °ü·Ã ¼ÒÇÁÆ®¿þ¾î