The ChainCon Software (Release 0.03)
Classes | Functions
ringz2.h File Reference

Elements of the ring Z_2. More...

#include <istream>
#include <ostream>
#include <sstream>
#include <string>
#include "chomp/system/config.h"

Go to the source code of this file.

Classes

class  tZ2
 An element of the ring Z_2. More...
 

Functions

int_t hashkey1 (const tZ2 &n)
 Generates a hashing key no. More...
 
int_t hashkey2 (const tZ2 &n)
 Generates a hashing key no. More...
 
std::istream & operator>> (std::istream &in, tZ2 &n)
 Reads an element from an input stream. More...
 
std::ostream & operator<< (std::ostream &out, const tZ2 &n)
 Writes an element to an output stream. More...
 
template<class intType >
bool operator== (const tZ2 &n1, const intType &n2)
 Operator == for checking whether a ring element is equivalent to an integer number. More...
 
template<class intType >
bool operator== (const intType &n1, const tZ2 &n2)
 Operator == for checking whether a ring element is equivalent to an integer number. More...
 

Detailed Description

Elements of the ring Z_2.

Definition in file ringz2.h.

Function Documentation

◆ hashkey1()

int_t hashkey1 ( const tZ2 n)
inline

Generates a hashing key no.

1 for an element of the Zp ring. This key is to be used in a hashed set.

Definition at line 165 of file ringz2.h.

◆ hashkey2()

int_t hashkey2 ( const tZ2 n)
inline

Generates a hashing key no.

2 for a general pair of elements, based on hashing keys of the elements. This key is to be used in a hashed set.

Definition at line 173 of file ringz2.h.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const tZ2 n 
)
inline

Writes an element to an output stream.

Definition at line 190 of file ringz2.h.

◆ operator==() [1/2]

template<class intType >
bool operator== ( const tZ2 n1,
const intType &  n2 
)
inline

Operator == for checking whether a ring element is equivalent to an integer number.

Intended to compare with 0 and 1 only.

Definition at line 201 of file ringz2.h.

◆ operator==() [2/2]

template<class intType >
bool operator== ( const intType &  n1,
const tZ2 n2 
)
inline

Operator == for checking whether a ring element is equivalent to an integer number.

Intended to compare with 0 and 1 only.

Definition at line 209 of file ringz2.h.

◆ operator>>()

std::istream& operator>> ( std::istream &  in,
tZ2 n 
)
inline

Reads an element from an input stream.

Definition at line 181 of file ringz2.h.

References tZ2::tZ2().