osl::ProofDisproof Class Reference

証明数(proof number)と反証数(disproof number). More...

`#include <proofDisproof.h>`

## Public Types

enum | { PROOF_SHIFT = 32 , DISPROOF_MASK = 0xffffffffu , PROOF_MAX = (0xffffffffu / 16) , DISPROOF_MAX = (0xffffffffu / 16) , NO_ESCAPE_DISPROOF = (DISPROOF_MAX - 1) , CHECK_MATE_DISPROOF = (DISPROOF_MAX - 2) , NO_CHECK_MATE_PROOF = (PROOF_MAX - 1) , PAWN_CHECK_MATE_PROOF = (PROOF_MAX - 2) , LOOP_DETECTION_PROOF = (PROOF_MAX - 3) , ATTACK_BACK_PROOF = (PROOF_MAX - 4) }
enum | { DISPROOF_LIMIT = (DISPROOF_MAX - 3) , PROOF_LIMIT = (PROOF_MAX - 5) }

## Public Member Functions

| ProofDisproof ()
| ProofDisproof (unsigned int proof, unsigned int disproof)
unsigned int | proof () const
unsigned int | disproof () const
bool | isCheckmateSuccess () const
bool | isCheckmateFail () const
bool | isFinal () const
bool | isUnknown () const
bool | isPawnDropFoul (Move move) const
| 打歩詰めなら真
bool | isLoopDetection () const
unsigned long long | ulonglongValue () const
bool | isBetterForAttack (const ProofDisproof &r) const
| this が r より攻方に都合が良い時に真
bool | isBetterForDefense (const ProofDisproof &r) const
| this が r より受方に都合が良い時に真
const ProofDisproof & | betterForAttack (const ProofDisproof &r) const
| 攻方に都合が良い方を返す
const ProofDisproof & | betterForDefense (const ProofDisproof &r) const
| 受方に都合が良い方を返す

## Static Public Member Functions

static const ProofDisproof | makeDirect (unsigned long long value)
static const ProofDisproof | NoEscape ()
static const ProofDisproof | Checkmate ()
static const ProofDisproof | NoCheckmate ()
static const ProofDisproof | PawnCheckmate ()
static const ProofDisproof | LoopDetection ()
static const ProofDisproof | AttackBack ()
static const ProofDisproof | Unknown ()
static const ProofDisproof | Bottom ()
| 攻方にも受方にも不都合な仮想的な数

## Static Public Attributes

static const unsigned int | BigProofNumber =PROOF_MAX

## Private Member Functions

| ProofDisproof (unsigned long long value)
| range check をしない private バージョン

## Static Private Member Functions

static void | testConsistency ()
static unsigned long long | compose (unsigned long long proof, unsigned long long disproof)
static const ProofDisproof | make (unsigned int proof, unsigned int disproof)

## Private Attributes

unsigned long long | pdp

## Detailed Description

証明数(proof number)と反証数(disproof number).

詰み局面と確定した時は proofNumber=0 不詰み局面と確定した時は disproofNumber=0

Definition at line 16 of file proofDisproof.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
PROOF_SHIFT |
DISPROOF_MASK |
PROOF_MAX |
DISPROOF_MAX |
NO_ESCAPE_DISPROOF | 反証数の定数: 詰んだ時には，詰の種類の区別に利用
CHECK_MATE_DISPROOF |
NO_CHECK_MATE_PROOF | 証明数の定数: 反証された時には，不詰の種類の区別に利用
PAWN_CHECK_MATE_PROOF |
LOOP_DETECTION_PROOF |
ATTACK_BACK_PROOF |

Definition at line 20 of file proofDisproof.h.

## anonymous enum

anonymous enum

Enumerator
DISPROOF_LIMIT | 通常の反証数の上限
PROOF_LIMIT | 通常の証明数の上限

Definition at line 37 of file proofDisproof.h.

## Constructor & Destructor Documentation

## ProofDisproof() [1/3]

osl::checkmate::ProofDisproof::ProofDisproof | ( | unsigned long long | value | ) |

inline private

range check をしない private バージョン

Definition at line 50 of file proofDisproof.h.

## ProofDisproof() [2/3]

osl::checkmate::ProofDisproof::ProofDisproof | ( |  | ) |

inline

Definition at line 59 of file proofDisproof.h.

## ProofDisproof() [3/3]

osl::checkmate::ProofDisproof::ProofDisproof | ( | unsigned int | proof,
|  | unsigned int | disproof )

inline

Definition at line 62 of file proofDisproof.h.

## Member Function Documentation

## AttackBack()

const ProofDisproof osl::checkmate::ProofDisproof::AttackBack | ( |  | ) |

inline static

Definition at line 79 of file proofDisproof.h.

## betterForAttack()

const ProofDisproof & osl::checkmate::ProofDisproof::betterForAttack | ( | const ProofDisproof & | r | ) | const

inline

攻方に都合が良い方を返す

Definition at line 128 of file proofDisproof.h.

## betterForDefense()

const ProofDisproof & osl::checkmate::ProofDisproof::betterForDefense | ( | const ProofDisproof & | r | ) | const

inline

受方に都合が良い方を返す

Definition at line 135 of file proofDisproof.h.

## Bottom()

const ProofDisproof osl::checkmate::ProofDisproof::Bottom | ( |  | ) |

inline static

攻方にも受方にも不都合な仮想的な数

Definition at line 82 of file proofDisproof.h.

## Checkmate()

const ProofDisproof osl::checkmate::ProofDisproof::Checkmate | ( |  | ) |

inline static

Definition at line 75 of file proofDisproof.h.

## compose()

unsigned long long osl::checkmate::ProofDisproof::compose | ( | unsigned long long | proof,
|  | unsigned long long | disproof )

inline static private

Definition at line 45 of file proofDisproof.h.

## disproof()

unsigned int osl::checkmate::ProofDisproof::disproof | ( |  | ) | const

inline

Definition at line 85 of file proofDisproof.h.

## isBetterForAttack()

bool osl::checkmate::ProofDisproof::isBetterForAttack | ( | const ProofDisproof & | r | ) | const

inline

this が r より攻方に都合が良い時に真

Definition at line 106 of file proofDisproof.h.

## isBetterForDefense()

bool osl::checkmate::ProofDisproof::isBetterForDefense | ( | const ProofDisproof & | r | ) | const

inline

this が r より受方に都合が良い時に真

Definition at line 117 of file proofDisproof.h.

## isCheckmateFail()

bool osl::checkmate::ProofDisproof::isCheckmateFail | ( |  | ) | const

inline

Definition at line 87 of file proofDisproof.h.

## isCheckmateSuccess()

bool osl::checkmate::ProofDisproof::isCheckmateSuccess | ( |  | ) | const

inline

Definition at line 86 of file proofDisproof.h.

## isFinal()

bool osl::checkmate::ProofDisproof::isFinal | ( |  | ) | const

inline

Definition at line 88 of file proofDisproof.h.

## isLoopDetection()

bool osl::checkmate::ProofDisproof::isLoopDetection | ( |  | ) | const

inline

Definition at line 97 of file proofDisproof.h.

## isPawnDropFoul()

bool osl::checkmate::ProofDisproof::isPawnDropFoul | ( | Move | move | ) | const

inline

打歩詰めなら真

Definition at line 92 of file proofDisproof.h.

## isUnknown()

bool osl::checkmate::ProofDisproof::isUnknown | ( |  | ) | const

inline

Definition at line 89 of file proofDisproof.h.

## LoopDetection()

const ProofDisproof osl::checkmate::ProofDisproof::LoopDetection | ( |  | ) |

inline static

Definition at line 78 of file proofDisproof.h.

## make()

const ProofDisproof osl::checkmate::ProofDisproof::make | ( | unsigned int | proof,
|  | unsigned int | disproof )

inline static private

Definition at line 54 of file proofDisproof.h.

## makeDirect()

const ProofDisproof osl::checkmate::ProofDisproof::makeDirect | ( | unsigned long long | value | ) |

inline static

Definition at line 71 of file proofDisproof.h.

## NoCheckmate()

const ProofDisproof osl::checkmate::ProofDisproof::NoCheckmate | ( |  | ) |

inline static

Definition at line 76 of file proofDisproof.h.

## NoEscape()

const ProofDisproof osl::checkmate::ProofDisproof::NoEscape | ( |  | ) |

inline static

Definition at line 74 of file proofDisproof.h.

## PawnCheckmate()

const ProofDisproof osl::checkmate::ProofDisproof::PawnCheckmate | ( |  | ) |

inline static

Definition at line 77 of file proofDisproof.h.

## proof()

unsigned int osl::checkmate::ProofDisproof::proof | ( |  | ) | const

inline

Definition at line 84 of file proofDisproof.h.

## testConsistency()

void osl::checkmate::ProofDisproof::testConsistency | ( |  | ) |

static private

Definition at line 4 of file proofDisproof.cc.

## ulonglongValue()

unsigned long long osl::checkmate::ProofDisproof::ulonglongValue | ( |  | ) | const

inline

Definition at line 99 of file proofDisproof.h.

## Unknown()

const ProofDisproof osl::checkmate::ProofDisproof::Unknown | ( |  | ) |

inline static

Definition at line 80 of file proofDisproof.h.

## Member Data Documentation

## BigProofNumber

const unsigned int osl::checkmate::ProofDisproof::BigProofNumber =PROOF_MAX

static

Definition at line 101 of file proofDisproof.h.

## pdp

unsigned long long osl::checkmate::ProofDisproof::pdp

private

Definition at line 18 of file proofDisproof.h.

The documentation for this class was generated from the following files:

- proofDisproof.h
- proofDisproof.cc