Procedural File: recipe_plugin.php
Source Location: /lib/indexing_plugins/recipe_plugin.php
Classes:
RecipePlugin
This class handles recipe processing.
Vertex
class to define vertex
Edge
class to define edge
Tree
class to define Minimum Spanning tree. constructMST constructs the minimum spanning tree using heap. formCluster forms clusters by deleting the most expensive edge. BreadthFirstSearch is used to traverse the MST.
Cluster
heap to maintain the MST
TreeCluster
heap to maintain the tree
Queue
queue for the BFS traversal
Page Details:
SeekQuarry/Yioop -- Open Source Pure PHP Search Engine, Crawler, and Indexer
Copyright (C) 2011 Priya Gangaraju priya.gangaraju@gmail.com LICENSE: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. END LICENSE
Tags:
Includes:
CLUSTER_RATIO [line 39]
construct_tree [line 824]
object arrat construct_tree(
object array $edges)
|
|
creates tree from the input and apply Kruskal's algorithm to find MST.
Tags:
Parameters
| object array |
$edges |
recipes with distances between them. |
kruskalClustering [line 877]
clusters kruskalClustering(
array $edges, int $count, array $distinct_ingredients)
|
|
Clusters the recipes by applying Kruskal's algorithm
Tags:
Parameters
| array |
$edges |
recipes and distances between them. |
| int |
$count |
number of recipes. |
| array |
$distinct_ingredients |
recipe names with ingredients. |
|