<?php
/*
class anagram
-------------
This example shows a faster filtering from
all anagrams, but implementation is a bit
more difficult.
*/
require_once( 'anagram.php' );
$anagrams = new anagram();
$anagrams->insert_word( "picture" );
// insert the base-1 index of the letter
$anagrams->add_bond( 1 ); // letter P
$anagrams->add_bond( 5 ); // letter U
$anagrams->add_bond( 3 ); // letter C
$anagrams->set_save_file( true ) ;
$anagrams->set_save_file_name( "ex3.html" ) ;
$anagrams->go();
?>
|