00001 /* -*-C-*- 00002 ******************************************************************************** 00003 * 00004 * File: findseam.h (Formerly findseam.h) 00005 * Description: 00006 * Author: Mark Seaman, SW Productivity 00007 * Created: Fri Oct 16 14:37:00 1987 00008 * Modified: Thu May 16 17:05:17 1991 (Mark Seaman) marks@hpgrlt 00009 * Language: C 00010 * Package: N/A 00011 * Status: Reusable Software Component 00012 * 00013 * (c) Copyright 1987, Hewlett-Packard Company. 00014 ** Licensed under the Apache License, Version 2.0 (the "License"); 00015 ** you may not use this file except in compliance with the License. 00016 ** You may obtain a copy of the License at 00017 ** http://www.apache.org/licenses/LICENSE-2.0 00018 ** Unless required by applicable law or agreed to in writing, software 00019 ** distributed under the License is distributed on an "AS IS" BASIS, 00020 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00021 ** See the License for the specific language governing permissions and 00022 ** limitations under the License. 00023 * 00024 *********************************************************************************/ 00025 00026 #ifndef FINDSEAM_H 00027 #define FINDSEAM_H 00028 00029 /*---------------------------------------------------------------------- 00030 I n c l u d e s 00031 ----------------------------------------------------------------------*/ 00032 #include "seam.h" 00033 #include "oldheap.h" 00034 #include "chop.h" 00035 00036 typedef HEAP *SEAM_QUEUE; 00037 typedef ARRAY SEAM_PILE; 00038 /*---------------------------------------------------------------------- 00039 F u n c t i o n s 00040 ----------------------------------------------------------------------*/ 00041 void junk_worst_seam(SEAM_QUEUE seams, SEAM *new_seam, float new_priority); 00042 00043 void choose_best_seam(SEAM_QUEUE seam_queue, 00044 SEAM_PILE *seam_pile, 00045 SPLIT *split, 00046 PRIORITY priority, 00047 SEAM **seam_result, 00048 TBLOB *blob); 00049 00050 void combine_seam(SEAM_QUEUE seam_queue, SEAM_PILE seam_pile, SEAM *seam); 00051 00052 inT16 constrained_split(SPLIT *split, TBLOB *blob); 00053 00054 void delete_seam_pile(SEAM_PILE seam_pile); 00055 00056 SEAM *pick_good_seam(TBLOB *blob); 00057 00058 PRIORITY seam_priority(SEAM *seam, inT16 xmin, inT16 xmax); 00059 00060 void try_point_pairs (EDGEPT * points[MAX_NUM_POINTS], 00061 inT16 num_points, 00062 SEAM_QUEUE seam_queue, 00063 SEAM_PILE * seam_pile, SEAM ** seam, TBLOB * blob); 00064 00065 void try_vertical_splits (EDGEPT * points[MAX_NUM_POINTS], 00066 inT16 num_points, 00067 SEAM_QUEUE seam_queue, 00068 SEAM_PILE * seam_pile, SEAM ** seam, TBLOB * blob); 00069 #endif