concepts.benchmark.logic_induction.family.Family#

class Family[source]#

Bases: object

A data structure that stores the relationship between N people in a family.

Methods

Attributes

__init__(nr_people, relations)[source]#

Initialize a family with relations.

Parameters:
  • nr_people (int) – number of people in the family.

  • relations (ndarray) – a 3D array of shape (nr_people, nr_people, 6), where relations[i, j, 0] = 1 if j is the husband of i, 0 otherwise. relations[i, j, 1] = 1 if j is the wife of i, 0 otherwise. relations[i, j, 2] = 1 if j is the father of i, 0 otherwise. relations[i, j, 3] = 1 if j is the mother of i, 0 otherwise. relations[i, j, 4] = 1 if j is the son of i, 0 otherwise. relations[i, j, 5] = 1 if j is the daughter of i, 0 otherwise.

__new__(**kwargs)#
get_grandfather()[source]#
Return type:

ndarray

get_grandmother()[source]#
Return type:

ndarray

get_grandparents()[source]#
Return type:

ndarray

get_maternal_great_uncle()[source]#
Return type:

ndarray

get_parents()[source]#
Return type:

ndarray

get_uncle()[source]#
Return type:

ndarray

has_daughter()[source]#
Return type:

ndarray

has_father()[source]#
Return type:

ndarray

has_sister()[source]#
Return type:

ndarray

property daughter: ndarray#
property father: ndarray#
property mother: ndarray#
property n: int#
property relations: ndarray#
property son: ndarray#