| Á¢¹Ì»ç Æ®¸® Á¢¹Ì»ç Æ®¸®´Â PERL ¿ë È¿À²ÀûÀÎ ¹®ÀÚ¿ Á¶ÀÛ µ¥ÀÌÅÍ ±¸Á¶ ÀÎÅÍÆäÀ̽º¸¦À§ÇÑ PERL ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Á¢¹Ì»ç Æ®¸® ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~shlomoy/SuffixTree-0.03/SuffixTree.pm
Á¢¹Ì»ç Æ®¸® ű×
Á¢¹Ì»ç Æ®¸® ¼³¸í
Á¢¹Ì»ç Æ®¸®´Â Perl ¿ë È¿À²ÀûÀÎ ¹®ÀÚ¿ Á¶ÀÛ µ¥ÀÌÅÍ ±¸Á¶ ÀÎÅÍÆäÀ̽º¸¦À§ÇÑ Perl ¸ðµâÀÔ´Ï´Ù. Á¢¹Ì»ç Æ®¸®´Â Perl.Synopsis »ç¿ë Á¢¼ÓÀ»À§ÇÑ È¿À²ÀûÀÎ ¹®ÀÚ¿ Á¶ÀÛ µ¥ÀÌÅÍ ±¸Á¶ ÀÎÅÍÆäÀ̽º¸¦À§ÇÑ Perl ¸ðµâÀÔ´Ï´Ù. ³» $ str = "¹Ì½Ã½ÃÇÇ"; ³» $ tree = create_tree ($ str); print_tree ($ Æ®¸®); MY $ PROSITION = FIND_SUBSTRING ($ TREE, "SSIS"); PRINTF (¹Ì½Ã½ÃÇÇÀÇ SSISÀÇ NOPOTIORÀº % LD.NN ", $ À§Ä¡); delete_tree ($ Æ®¸®); #ÁÖÀÇ »çÇ× :ÀÌ ¹æ¹ýÀº °ð ´õ ÀÌ»ó »ç¿ëµÇÁö ¾Ê°Ô µÉ °ÍÀÔ´Ï´Ù. ½Ã³ñ½Ã½º Á¢¹Ì»ç¸¦ »ç¿ëÇÕ´Ï´Ù. ³» $ str = "¹Ì½Ã½ÃÇÇ"; ³» $ tree = st_createreree ($ str, ±æÀÌ ($ str)); st_printtree ($ Æ®¸®); ³» $ PROSITION = ST_FINDSUBSTRING ($ TREE, "SSIS", 4); PRINTF (¹Ì½Ã½ÃÇÇÀÇ SSISÀÇ NOPOTIORÀº % LD.NN ", $ À§Ä¡); st_deleteretee ($ Æ®¸®); ¿ä±¸ »çÇ× : ¡¤ Perl.
Á¢¹Ì»ç Æ®¸® °ü·Ã ¼ÒÇÁÆ®¿þ¾î