ccstruct/lmedsq.cpp File Reference

#include "mfcpch.h"
#include <stdlib.h>
#include "statistc.h"
#include "memry.h"
#include "lmedsq.h"

Go to the source code of this file.

Defines

Functions


Define Documentation

#define EXTERN

Note:
File: lmedsq.cpp (Formerly lms.c)
Code for the LMS class.
Author:
Ray Smith
Date:
Fri Aug 7 09:30:53 BST 1992
 * (C) Copyright 1992, Hewlett-Packard Ltd.
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
 ** You may obtain a copy of the License at
 ** http://www.apache.org/licenses/LICENSE-2.0
 ** Unless required by applicable law or agreed to in writing, software
 ** distributed under the License is distributed on an "AS IS" BASIS,
 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ** See the License for the specific language governing permissions and
 ** limitations under the License.

Definition at line 27 of file lmedsq.cpp.

#define LMS_MAX_FAILURES   3

Definition at line 38 of file lmedsq.cpp.

Referenced by LMS::pick_line(), and LMS::pick_quadratic().

#define SEED1   0x1234

default seeds

Definition at line 35 of file lmedsq.cpp.

Referenced by choose_nth_item(), LMS::constrained_fit(), LMS::pick_line(), and LMS::pick_quadratic().

#define SEED2   0x5678

Definition at line 36 of file lmedsq.cpp.

Referenced by choose_nth_item(), LMS::constrained_fit(), LMS::pick_line(), and LMS::pick_quadratic().

#define SEED3   0x9abc

Definition at line 37 of file lmedsq.cpp.

Referenced by choose_nth_item(), LMS::constrained_fit(), LMS::pick_line(), and LMS::pick_quadratic().


Function Documentation

UINT32 nrand48 ( UINT16 seeds  ) 

Definition at line 41 of file lmedsq.cpp.

Referenced by choose_nth_item(), LMS::constrained_fit(), LMS::pick_line(), and LMS::pick_quadratic().

00043                 {
00044   static UINT32 seed = 0;        //only seed
00045 
00046   if (seed == 0) {
00047     seed = seeds[0] ^ (seeds[1] << 8) ^ (seeds[2] << 16);
00048     srand(seed); 
00049   }
00050                                  //make 32 bit one
00051   return rand () | (rand () << 16);
00052 }


Generated on Wed Feb 28 19:49:16 2007 for Tesseract by  doxygen 1.5.1