'privPointLoc'
Public Member Functions | List of all members
Node Class Reference

Public Member Functions

 Node (Tree *, Segment *, NodeType)
 
NodegetLeft ()
 
NodegetRight ()
 
SegmentgetSegment ()
 
void setLeft (Node *)
 
void setRight (Node *)
 
void setSegment (Segment *)
 
TreegetTree ()
 
int getMatrixIndex ()
 
std::string getMatrixLabel ()
 
void setMatrixParams (int, std::string)
 
int getValue ()
 
void setValue (int)
 
NodeType getNodeType ()
 
void setNodeType (NodeType)
 
bool getIsRight ()
 
void setIsRight (bool)
 
void addPathLabel (std::string)
 
std::vector< std::string > getPathLabels ()
 
void evaluateNode (Encryptor &, PrivPointUtil *, helib::Ctxt, int, int)
 
helib::Ctxt getNodeResult ()
 

Member Function Documentation

◆ addPathLabel()

void Node::addPathLabel ( std::string  s)

Takes a std::string and accumulates to the path label This is a helper function when constructing the adjacency matrix.

Parameters
std::string
Returns
void

◆ evaluateNode()

void Node::evaluateNode ( Encryptor encryptor,
PrivPointUtil privUtil,
helib::Ctxt  pointCtxt,
int  maxBits,
int  nSlots 
)

Evaluate this node. This is the function called in parallel for parallel-processing of all Y and X nodes. Stores the temporary result in a helib::Ctxt, and this object has a pointer to that Ctxt as a parameter. It takes in encryptor and privPointUtil objects in order to make use of the functions It takes in the ctxt encoding & encrypting the user's point It takes two integers representing the bitlength and the number of slots (indices) in the ciphertext (underlying vector).

Parameters
Encryptor& encryptor, PrivPointUtil *, helib::Ctxt, int, int
Returns
void

◆ getIsRight()

bool Node::getIsRight ( )

Gets the boolean variable isRight, which is true or false based upon if the Node is the right (true) or left (false) child of another node. This is a helper function when constructing the adjacency matrix.

Parameters
void
Returns
bool

◆ getLeft()

Node * Node::getLeft ( )

returns a pointer to the left child of this node

Parameters
void
Returns
Node *

◆ getMatrixIndex()

int Node::getMatrixIndex ( )

Returns the index of this node in the adjacency matrix

Parameters
void
Returns
int

◆ getMatrixLabel()

std::string Node::getMatrixLabel ( )

Returns the label of this node in the adjacency matrix

Parameters
void
Returns
std::string

◆ getNodeResult()

helib::Ctxt Node::getNodeResult ( )

This function is for when the paths are being evaluated. Assuming the node has already been evaluated, this returns the helib::Ctxt object which contains the evaluation result.

Parameters
void
Returns
helib::Ctxt

◆ getNodeType()

NodeType Node::getNodeType ( )

Returns the NodeType value for this node. The enum NodeType has three possible values: x, y, or leaf. The node is set based upon its type in the DAG

Parameters
void
Returns
NodeType

◆ getPathLabels()

std::vector< std::string > Node::getPathLabels ( )

Returns the path labels. Only used for leaf nodes. Returns a vector of strings in the case there are multiple paths to the leaf.

Parameters
void
Returns
std::vector<std::string>

◆ getRight()

Node * Node::getRight ( )

returns a pointer to the right child of this node

Parameters
void
Returns
Node *

◆ getSegment()

Segment * Node::getSegment ( )

returns a pointer to the Segment object which this Node references.

Parameters
void
Returns
Segment *

◆ getTree()

Tree * Node::getTree ( )

Return the pointer to the tree which contains this Node

Parameters
void
Returns
Tree *

◆ getValue()

int Node::getValue ( )

Returns the 'value' parameter for this node. For a X-node, this is the x-value. For a Y-Node or Leaf-Node, this is the ID.

Parameters
void
Returns
int

◆ setIsRight()

void Node::setIsRight ( bool  b)

Sets the boolean variable isRight, which is true or false based upon if the Node is the right (true) or left (false) child of another node. This is a helper function when constructing the adjacency matrix.

Parameters
bool
Returns
void

◆ setLeft()

void Node::setLeft ( Node node)

Sets a the left child of the current node. Used during the DAG/Tree construction

Parameters
Node*
Returns
void

◆ setMatrixParams()

void Node::setMatrixParams ( int  v,
std::string  s 
)

Sets this Node's parameters for use in the adjacency matrix

Parameters
int,std::string
Returns
void

◆ setNodeType()

void Node::setNodeType ( NodeType  t)

Sets the NodeType value for this node. The enum NodeType has three possible values: x, y, or leaf. The node is set based upon its type in the DAG

Parameters
NodeType
Returns
void

◆ setRight()

void Node::setRight ( Node node)

Sets a the right child of the current node. Used during the DAG/Tree construction

Parameters
Node*
Returns
void

◆ setSegment()

void Node::setSegment ( Segment )

Sets a the Segment object of the current node. Used during the DAG/Tree construction

Parameters
Node*
Returns
void

◆ setValue()

void Node::setValue ( int  v)

Sets the 'value' parameter for this node. For a X-node, this is the x-value. For a Y-Node or Leaf-Node, this is the ID.

Parameters
int
Returns
void

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