HOG2
Classes | Enumerations | Functions
Witness.h File Reference
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstring>
#include <iostream>
#include <numeric>
#include <regex>
#include <sstream>
#include <string>
#include "SearchEnvironment.h"
#include "vectorCache.h"
Include dependency graph for Witness.h:

Go to the source code of this file.

Classes

class  WitnessState< width, height >
 
class  InteractiveWitnessState< width, height >
 
struct  WitnessRegionConstraint
 
class  Witness< width, height >
 
struct  Witness< width, height >::mustCrossEdgeConstraint
 
struct  Witness< width, height >::separationObject
 
struct  Witness< width, height >::PathLocation
 

Enumerations

enum  WitnessAction {
  kUp, kDown, kLeft, kRight,
  kStart, kEnd
}
 
enum  WitnessRegionConstraintType {
  kNoRegionConstraint = 0, kSeparation = 1, kStar = 2, kTetris = 3,
  kNegativeTetris = 4, kTriangle = 5, kEraser = 6, kRegionConstraintCount = 7
}
 
enum  WitnessPathConstraintType { kNoPathConstraint = 0, kMustCross = 1, kCannotCross = 2, kPathConstraintCount = 3 }
 

Functions

template<int width, int height>
int GetEdgeHash (bool horizontal, int x, int y)
 
template<int width, int height>
int GetEdgeHash (int x1, int y1, int x2, int y2)
 
template<int width, int height>
static bool operator== (const WitnessState< width, height > &a, const WitnessState< width, height > &b)
 
template<int width, int height>
std::ostream & operator<< (std::ostream &os, const Witness< width, height > &witness)
 
template<int width, int height>
std::istream & operator>> (std::istream &is, Witness< width, height > &witness)
 

Enumeration Type Documentation

◆ WitnessAction

Enumerator
kUp 
kDown 
kLeft 
kRight 
kStart 
kEnd 

Definition at line 134 of file Witness.h.

◆ WitnessPathConstraintType

Enumerator
kNoPathConstraint 
kMustCross 
kCannotCross 
kPathConstraintCount 

Definition at line 213 of file Witness.h.

◆ WitnessRegionConstraintType

Enumerator
kNoRegionConstraint 
kSeparation 
kStar 
kTetris 
kNegativeTetris 
kTriangle 
kEraser 
kRegionConstraintCount 

Definition at line 181 of file Witness.h.

Function Documentation

◆ GetEdgeHash() [1/2]

template<int width, int height>
int GetEdgeHash ( bool  horizontal,
int  x,
int  y 
)

Definition at line 26 of file Witness.h.

References height, and width.

◆ GetEdgeHash() [2/2]

template<int width, int height>
int GetEdgeHash ( int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 32 of file Witness.h.

References min().

◆ operator<<()

template<int width, int height>
std::ostream& operator<< ( std::ostream &  os,
const Witness< width, height > &  witness 
)
inline

Definition at line 3140 of file Witness.h.

References Witness< width, height >::Serialize().

◆ operator==()

template<int width, int height>
static bool operator== ( const WitnessState< width, height > &  a,
const WitnessState< width, height > &  b 
)
static

Definition at line 144 of file Witness.h.

◆ operator>>()

template<int width, int height>
std::istream& operator>> ( std::istream &  is,
Witness< width, height > &  witness 
)
inline

Definition at line 3146 of file Witness.h.

References Witness< width, height >::Deserialize().