📄 rsesstop.cpp
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Global function used by the RSES library.
// Revisions.....:
//===================================================================
#include <stdafx.h> // Precompiled headers.
#include <copyright.h>
#include <kernel/basic/message.h>
#include <common/configuration.h>
//-------------------------------------------------------------------
// Static methods (file scope).
//===================================================================
//-------------------------------------------------------------------
// Method........: StaticMakesSense
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Comments......:
// Revisions.....:
//===================================================================
/*
static bool
StaticMakesSense(int no_reducts) {
static int no_reducts_previous = 0;
// Negative number? That's definitely non-sensical.
if (no_reducts < 0)
return false;
// Standstill? That's probably OK.
if (no_reducts == no_reducts_previous)
return true;
// Decreasing? Probably OK, could be a "new cycle".
if (no_reducts < no_reducts_previous) {
no_reducts_previous = no_reducts;
return true;
}
// Very large increase? That's probably non-sensical.
if (no_reducts - no_reducts_previous > 500) {
no_reducts_previous = 0;
return false;
}
// Better safe than sorry.
return false;
}
*/
//-------------------------------------------------------------------
// Method........: stop (global)
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Global function used by the RSES library.
// Comments......: Excerpt from the RSES library technical documentation:
//
// It has to be written function int stop(int info, ...).
// This function is called from most loops of calculating
// functions and enables to break calculations. This
// function should return 1 if you want to continue
// calculations and 0 otherwise. The info parameters describes
// which function is calling stop. In the simplest case when
// there is no need to have the possibility to stop calculations
// the definition of this function may be as follows:
//
// int stop(int,...) {
// return 1;
// }
//
// This function may be written to check a special variable
// that is changed whenever the operation shall be stopped:
//
// Info: Description:
// REDUCTS Calculating reducts number of found reducts (long)
// GEN_DECISION Creating generalized decision
// DISCMATRIX Creating discernibility matrix
// REDUCEMATRIX Reducing disc. matrix
// CLEARREDUNDANT Removing redundant elements
// LOAD_TABLE Loading decision table
// APPROXREDUCT Johnson algorithm
//
// Revisions.....: A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -