repo
stringlengths 1
152
⌀ | file
stringlengths 15
205
| code
stringlengths 0
41.6M
| file_length
int64 0
41.6M
| avg_line_length
float64 0
1.81M
| max_line_length
int64 0
12.7M
| extension_type
stringclasses 90
values |
---|---|---|---|---|---|---|
la3dm | la3dm-master/include/bgklvoctomap/bgklvinference.h | #ifndef LA3DM_BGKLV_H
#define LA3DM_BGKLV_H
namespace la3dm {
/*
* @brief Bayesian Generalized Kernel Inference on Bernoulli distribution
* @param dim dimension of data (2, 3, etc.)
* @param T data type (float, double, etc.)
* @ref Nonparametric Bayesian inference on multivariate exponential families
*/
template<int dim, typename T>
class BGKLVInference {
public:
/// Eigen matrix type for training and test data and kernel
using MatrixXType = Eigen::Matrix<T, -1, 2*dim, Eigen::RowMajor>;
using MatrixPType = Eigen::Matrix<T, -1, dim, Eigen::RowMajor>;
using MatrixKType = Eigen::Matrix<T, -1, -1, Eigen::RowMajor>;
using MatrixDKType = Eigen::Matrix<T, -1, 1>;
using MatrixYType = Eigen::Matrix<T, -1, 1>;
float EPSILON = 0.0001;
BGKLVInference(T sf2, T ell) : sf2(sf2), ell(ell), trained(false) { }
/*
* @brief Fit BGKLV Model
* @param x input vector (3N, row major)
* @param y target vector (N)
*/
void train(const std::vector<T> &x, const std::vector<T> &y) {
assert(x.size() % (2*dim) == 0 && (int) (x.size() / (2*dim)) == y.size());
MatrixXType _x = Eigen::Map<const MatrixXType>(x.data(), x.size() / (2*dim), 2*dim);
MatrixYType _y = Eigen::Map<const MatrixYType>(y.data(), y.size(), 1);
train(_x, _y);
}
/*
* @brief Fit BGKLV Model
* @param x input matrix (NX3)
* @param y target matrix (NX1)
*/
void train(const MatrixXType &x, const MatrixYType &y) {
// std::cout << "training pt2" << std::endl;
this->xt = MatrixXType(x);
this->yt = MatrixYType(y);
trained = true;
}
/*
* @brief Predict with BGKLV Model
* @param xs input vector (3M, row major)
* @param ybar positive class kernel density estimate (\bar{y})
* @param kbar kernel density estimate (\bar{k})
*/
void predict(const std::vector<T> &xs, std::vector<T> &ybar, std::vector<T> &kbar) const {
assert(xs.size() % dim == 0);
MatrixPType _xs = Eigen::Map<const MatrixPType>(xs.data(), xs.size() / dim, dim);
MatrixYType _ybar, _kbar;
predict(_xs, _ybar, _kbar);
ybar.resize(_ybar.rows());
kbar.resize(_kbar.rows());
for (int r = 0; r < _kbar.rows(); ++r) {
ybar[r] = _ybar(r, 0);
kbar[r] = _kbar(r, 0);
}
}
/*
* @brief Predict with nonparametric Bayesian generalized kernel inference
* @param xs input vector (M x 3)
* @param ybar positive class kernel density estimate (M x 1)
* @param kbar kernel density estimate (M x 1)
*/
void predict(const MatrixPType &xs, MatrixYType &ybar, MatrixYType &kbar) const {
// std::cout << "second prediction step" << std::endl;
assert(trained == true);
MatrixKType Ks;
covSparseLine(xs, xt, Ks);
// std::cout << "computed covsparseline" << std::endl;
ybar = (Ks * yt).array();
kbar = Ks.rowwise().sum().array();
}
private:
/*
* @brief Compute Euclid distances between two vectors.
* @param x input vector
* @param z input vecotr
* @return d distance matrix
*/
void dist(const MatrixXType &x, const MatrixXType &z, MatrixKType &d) const {
d = MatrixKType::Zero(x.rows(), z.rows());
for (int i = 0; i < x.rows(); ++i) {
d.row(i) = (z.rowwise() - x.row(i)).rowwise().norm();
}
}
void point_to_line_dist(const MatrixPType &x, const MatrixXType &z, MatrixKType &d) const {
assert((x.cols() == 3) && (z.cols() == 6));
d = MatrixKType::Zero(x.rows(), z.rows());
float line_len;
point3f p, p0, p1, v, w, line_vec, pnt_vec, nearest;
float t;
for (int i = 0; i < x.rows(); ++i) {
p = point3f(x(i,0), x(i,1), x(i,2));
for (int j = 0; j < z.rows(); ++j) {
p0 = point3f(z(j,0), z(j,1), z(j,2));
p1 = point3f(z(j,3), z(j,4), z(j,5));
line_vec = p1 - p0;
line_len = line_vec.norm();
pnt_vec = p - p0;
if (line_len < EPSILON) {
d(i,j) = (p-p0).norm();
}
else {
double c1 = pnt_vec.dot(line_vec);
double c2 = line_vec.dot(line_vec);
if ( c1 <= 0) {
d(i,j) = (p - p0).norm();
}
else if (c2 <= c1) {
d(i,j) = (p - p1).norm();
}
else{
double b = c1 / c2;
nearest = p0 + (line_vec*b);
d(i,j) = (p - nearest).norm();
}
}
}
}
}
/*
* @brief Sparse kernel.
* @param x input vector
* @param z input vector
* @return Kxz covariance matrix
* @ref A sparse covariance function for exact gaussian process inference in large datasets.
*/
void covSparseLine(const MatrixPType &x, const MatrixXType &z, MatrixKType &Kxz) const {
point_to_line_dist(x, z, Kxz); // Check on this
Kxz /= ell;
for (int i = 0; i < Kxz.rows(); ++i)
{
for (int j = 0; j < Kxz.cols(); ++j)
if (Kxz(i,j) > 1.0)
Kxz(i,j) = 1.0f;
}
//sparse kernel function
Kxz = (((2.0f + (Kxz * 2.0f * 3.1415926f).array().cos()) * (1.0f - Kxz.array()) / 3.0f) + (Kxz * 2.0f * 3.1415926f).array().sin() / (2.0f * 3.1415926f)).matrix() * sf2;
}
T sf2; // signal variance
T ell; // length-scale
MatrixXType xt; // temporary storage of training data
MatrixYType yt; // temporary storage of training labels
bool trained; // true if bgklvinference stored training data
};
typedef BGKLVInference<3, float> BGKLV3f;
}
#endif // LA3DM_BGKLV_H
| 6,530 | 36.97093 | 180 | h |
la3dm | la3dm-master/include/bgklvoctomap/bgklvoctomap.h | #ifndef LA3DM_BGKLV_OCTOMAP_H
#define LA3DM_BGKLV_OCTOMAP_H
#include <unordered_map>
#include <vector>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include "rtree.h"
#include "bgklvblock.h"
#include "bgklvoctree_node.h"
#include "point6f.h"
namespace la3dm {
/// PCL PointCloud types as input
typedef pcl::PointXYZ PCLPointType;
typedef pcl::PointCloud<PCLPointType> PCLPointCloud;
/*
* @brief BGKLVOctoMap
*
* Bayesian Generalized Kernel Inference for Occupancy Map Prediction
* The space is partitioned by Blocks in which OcTrees with fixed
* depth are rooted. Occupancy values in one Block is predicted by
* each cell via Bayesian generalized kernel inference.
*/
class BGKLVOctoMap {
public:
/// Types used internally
typedef std::vector<point3f> PointCloud;
typedef std::pair<point3f, float> GPPointType;
typedef std::pair<point6f, float> GPLineType; // generalizes GPPointType
typedef std::vector<GPPointType> GPPointCloud;
typedef std::vector<GPLineType> GPLineCloud; // generalizes GPLineType
typedef RTree<int, float, 3, float> MyRTree;
public:
BGKLVOctoMap();
/*
* @param resolution (default 0.1m)
* @param block_depth maximum depth of OcTree (default 4)
* @param sf2 signal variance in GPs (default 1.0)
* @param free_thresh free threshold for Occupancy probability (default 0.3)
* @param occupied_thresh occupied threshold for Occupancy probability (default 0.7)
* @param var_thresh variance threshold to define UNCERTAIN State (default 0.2)
* @param prior_A prior weight of Occupied expectation (default 0.001)
* @param prior_B prior weight of Free expectation (default 0.001)
* @param original_size boolean whether or not to prune (default true)
* @param MIN_W threshold for UNKNOWN (default 0.001)
*/
BGKLVOctoMap(float resolution,
unsigned short block_depth,
float sf2,
float ell,
float free_thresh,
float occupied_thresh,
float var_thresh,
float prior_A,
float prior_B,
bool original_size,
float MIN_W);
~BGKLVOctoMap();
/// Set resolution.
void set_resolution(float resolution);
/// Set block max depth.
void set_block_depth(unsigned short max_depth);
/// Get resolution.
inline float get_resolution() const { return resolution; }
/// Get block max depth.
inline float get_block_depth() const { return block_depth; }
/*
* @brief Insert PCL PointCloud into BGKLVOctoMaps.
* @param cloud one scan in PCLPointCloud format
* @param origin sensor origin in the scan
* @param ds_resolution downsampling resolution for PCL VoxelGrid filtering (-1 if no downsampling)
* @param free_res resolution for sampling free training points along sensor beams (default 2.0)
* @param max_range maximum range for beams to be considered as valid measurements (-1 if no limitation)
*/
void insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res = 2.0f,
float max_range = -1);
void insert_training_data(const GPLineCloud &cloud);
/// Get bounding box of the map.
void get_bbox(point3f &lim_min, point3f &lim_max) const;
class RayCaster {
public:
RayCaster(const BGKLVOctoMap *map, const point3f &start, const point3f &end) : map(map) {
assert(map != nullptr);
_block_key = block_to_hash_key(start);
block = map->search(_block_key);
lim = static_cast<unsigned short>(pow(2, map->block_depth - 1));
if (block != nullptr) {
block->get_index(start, x, y, z);
block_lim = block->get_center();
block_size = block->size;
current_p = start;
resolution = map->resolution;
int x0 = static_cast<int>((start.x() / resolution));
int y0 = static_cast<int>((start.y() / resolution));
int z0 = static_cast<int>((start.z() / resolution));
int x1 = static_cast<int>((end.x() / resolution));
int y1 = static_cast<int>((end.y() / resolution));
int z1 = static_cast<int>((end.z() / resolution));
dx = abs(x1 - x0);
dy = abs(y1 - y0);
dz = abs(z1 - z0);
n = 1 + dx + dy + dz;
x_inc = x1 > x0 ? 1 : (x1 == x0 ? 0 : -1);
y_inc = y1 > y0 ? 1 : (y1 == y0 ? 0 : -1);
z_inc = z1 > z0 ? 1 : (z1 == z0 ? 0 : -1);
xy_error = dx - dy;
xz_error = dx - dz;
yz_error = dy - dz;
dx *= 2;
dy *= 2;
dz *= 2;
} else {
n = 0;
}
}
inline bool end() const { return n <= 0; }
bool next(point3f &p, OcTreeNode &node, BlockHashKey &block_key, OcTreeHashKey &node_key) {
assert(!end());
bool valid = false;
unsigned short index = x + y * lim + z * lim * lim;
node_key = Block::index_map[index];
block_key = _block_key;
if (block != nullptr) {
valid = true;
node = (*block)[node_key];
current_p = block->get_point(x, y, z);
p = current_p;
} else {
p = current_p;
}
if (xy_error > 0 && xz_error > 0) {
x += x_inc;
current_p.x() += x_inc * resolution;
xy_error -= dy;
xz_error -= dz;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error < 0 && yz_error > 0) {
y += y_inc;
current_p.y() += y_inc * resolution;
xy_error += dx;
yz_error -= dz;
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
} else if (yz_error < 0 && xz_error < 0) {
z += z_inc;
current_p.z() += z_inc * resolution;
xz_error += dx;
yz_error += dy;
if (z >= lim || z < 0) {
block_lim.z() += z_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
z = z_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error == 0) {
x += x_inc;
y += y_inc;
n -= 2;
current_p.x() += x_inc * resolution;
current_p.y() += y_inc * resolution;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
}
n--;
return valid;
}
private:
const BGKLVOctoMap *map;
Block *block;
point3f block_lim;
float block_size, resolution;
int dx, dy, dz, error, n;
int x_inc, y_inc, z_inc, xy_error, xz_error, yz_error;
unsigned short index, x, y, z, lim;
BlockHashKey _block_key;
point3f current_p;
};
/// LeafIterator for iterating all leaf nodes in blocks
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator(const BGKLVOctoMap *map) {
assert(map != nullptr);
block_it = map->block_arr.cbegin();
end_block = map->block_arr.cend();
if (map->block_arr.size() > 0) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
} else {
leaf_it = OcTree::LeafIterator();
end_leaf = OcTree::LeafIterator();
}
}
// just for initializing end iterator
LeafIterator(std::unordered_map<BlockHashKey, Block *>::const_iterator block_it,
OcTree::LeafIterator leaf_it)
: block_it(block_it), leaf_it(leaf_it), end_block(block_it), end_leaf(leaf_it) { }
bool operator==(const LeafIterator &other) {
return (block_it == other.block_it) && (leaf_it == other.leaf_it);
}
bool operator!=(const LeafIterator &other) {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
++leaf_it;
if (leaf_it == end_leaf) {
++block_it;
if (block_it != end_block) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
}
}
return *this;
}
OcTreeNode &operator*() const {
return *leaf_it;
}
std::vector<point3f> get_pruned_locs() const {
std::vector<point3f> pruned_locs;
point3f center = get_loc();
float size = get_size();
float x0 = center.x() - size * 0.5 + Block::resolution * 0.5;
float y0 = center.y() - size * 0.5 + Block::resolution * 0.5;
float z0 = center.z() - size * 0.5 + Block::resolution * 0.5;
float x1 = center.x() + size * 0.5;
float y1 = center.y() + size * 0.5;
float z1 = center.z() + size * 0.5;
for (float x = x0; x < x1; x += Block::resolution) {
for (float y = y0; y < y1; y += Block::resolution) {
for (float z = z0; z < z1; z += Block::resolution) {
pruned_locs.emplace_back(x, y, z);
}
}
}
return pruned_locs;
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline point3f get_loc() const {
return block_it->second->get_loc(leaf_it);
}
inline float get_size() const {
return block_it->second->get_size(leaf_it);
}
private:
std::unordered_map<BlockHashKey, Block *>::const_iterator block_it;
std::unordered_map<BlockHashKey, Block *>::const_iterator end_block;
OcTree::LeafIterator leaf_it;
OcTree::LeafIterator end_leaf;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); }
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(block_arr.cend(), OcTree::LeafIterator()); }
OcTreeNode search(point3f p) const;
OcTreeNode search(float x, float y, float z) const;
Block *search(BlockHashKey key) const;
inline float get_block_size() const { return block_size; }
private:
/// @return true if point is inside a bounding box given min and max limits.
inline bool gp_point_in_bbox(const GPPointType &p, const point3f &lim_min, const point3f &lim_max) const {
return (p.first.x() > lim_min.x() && p.first.x() < lim_max.x() &&
p.first.y() > lim_min.y() && p.first.y() < lim_max.y() &&
p.first.z() > lim_min.z() && p.first.z() < lim_max.z());
}
/// Get the bounding box of a pointcloud.
void bbox(const GPLineCloud &cloud, point3f &lim_min, point3f &lim_max) const;
/// Get all block indices inside a bounding box.
void get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
std::vector<BlockHashKey> &blocks) const;
/// Get all points inside a bounding box assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
std::vector<int> &out);
/// @return true if point exists inside a bounding box assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max);
/// Get all points inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const BlockHashKey &key, std::vector<int> &out);
/// @return true if point exists inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const BlockHashKey &key);
/// Get all points inside an extended block assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const ExtendedBlock &block, std::vector<int> &out);
/// @return true if point exists inside an extended block assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const ExtendedBlock &block);
/// RTree callback function
static bool count_callback(int p, void *arg);
/// RTree callback function
static bool search_callback(int p, void *arg);
/// Downsample PCLPointCloud using PCL VoxelGrid Filtering.
void downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const;
/// Sample free training points along sensor beams.
void beam_sample(const point3f &hits, const point3f &origin, PointCloud &frees,
float free_resolution) const;
/// Get training data from one sensor scan.
void get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPLineCloud &xy, GPLineCloud &rays, std::vector<int> &ray_idx) const;
float resolution;
float block_size;
unsigned short block_depth;
std::unordered_map<BlockHashKey, Block *> block_arr;
MyRTree rtree;
};
}
#endif // LA3DM_BGKLVOCTOMAP_H
| 16,075 | 40.43299 | 140 | h |
la3dm | la3dm-master/include/bgklvoctomap/bgklvoctree.h | #ifndef LA3DM_BGKLV_OCTREE_H
#define LA3DM_BGKLV_OCTREE_H
#include <stack>
#include <vector>
#include "point3f.h"
#include "bgklvoctree_node.h"
namespace la3dm {
/// Hash key to index OcTree nodes given depth and the index in that layer.
typedef int OcTreeHashKey;
/// Convert from node to hask key.
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned long index);
/// Convert from hash key to node.
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned long &index);
/*
* @brief A simple OcTree to organize occupancy data in one block.
*
* OcTree doesn't store positions of nodes in order to reduce memory usage.
* The nodes in OcTrees are indexed by OcTreeHashKey which can be used to
* retrieve positions later (See Block).
* For the purpose of mapping, this OcTree has fixed depth which should be
* set before using OcTrees.
*/
class OcTree {
friend class BGKLVOctoMap;
public:
OcTree();
~OcTree();
OcTree(const OcTree &other);
OcTree &operator=(const OcTree &other);
/*
* @brief Rursively pruning OcTreeNodes with the same state.
*
* Prune nodes by setting nodes to PRUNED.
* Delete the layer if all nodes are pruned.
*/
bool prune();
/// @return true if this node is a leaf node.
bool is_leaf(OcTreeHashKey key) const;
/// @return true if this node is a leaf node.
bool is_leaf(unsigned short depth, unsigned long index) const;
/// @return true if this node exists and is not pruned.
bool search(OcTreeHashKey key) const;
/// @return Occupancy of the node (without checking if it exists!)
OcTreeNode &operator[](OcTreeHashKey key) const;
/// Leaf iterator for OcTrees: iterate all leaf nodes not pruned.
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator() : tree(nullptr) { }
LeafIterator(const OcTree *tree)
: tree(tree != nullptr && tree->node_arr != nullptr ? tree : nullptr) {
if (tree != nullptr) {
stack.emplace(0, 0);
stack.emplace(0, 0);
++(*this);
}
}
LeafIterator(const LeafIterator &other) : tree(other.tree), stack(other.stack) { }
LeafIterator &operator=(const LeafIterator &other) {
tree = other.tree;
stack = other.stack;
return *this;
}
bool operator==(const LeafIterator &other) const {
return (tree == other.tree) &&
(stack.size() == other.stack.size()) &&
(stack.size() == 0 || (stack.size() > 0 &&
(stack.top().depth == other.stack.top().depth) &&
(stack.top().index == other.stack.top().index)));
}
bool operator!=(const LeafIterator &other) const {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
if (stack.empty()) {
tree = nullptr;
} else {
stack.pop();
while (!stack.empty() && !tree->is_leaf(stack.top().depth, stack.top().index))
single_inc();
if (stack.empty())
tree = nullptr;
}
return *this;
}
inline OcTreeNode &operator*() const {
return (*tree)[get_hash_key()];
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline OcTreeHashKey get_hash_key() const {
OcTreeHashKey key = node_to_hash_key(stack.top().depth, stack.top().index);
return key;
}
protected:
void single_inc() {
StackElement top(stack.top());
stack.pop();
for (int i = 0; i < 8; ++i) {
stack.emplace(top.depth + 1, top.index * 8 + i);
}
}
struct StackElement {
unsigned short depth;
unsigned long index;
StackElement(unsigned short depth, unsigned long index)
: depth(depth), index(index) { }
};
const OcTree *tree;
std::stack<StackElement, std::vector<StackElement> > stack;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); };
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(nullptr); };
private:
OcTreeNode **node_arr;
static unsigned short max_depth;
};
}
#endif // LA3DM_BGKLV_OCTREE_H
| 5,281 | 31.604938 | 98 | h |
la3dm | la3dm-master/include/bgklvoctomap/bgklvoctree_node.h | #ifndef LA3DM_BGKLV_OCCUPANCY_H
#define LA3DM_BGKLV_OCCUPANCY_H
#include <iostream>
#include <fstream>
#include <cmath>
namespace la3dm {
/// Occupancy state: before pruning: FREE, OCCUPIED, UNKNOWN, UNCERTAIN; after pruning: PRUNED
enum class State : char {
FREE, OCCUPIED, UNKNOWN, UNCERTAIN, PRUNED
};
/*
* @brief Inference ouputs and occupancy state.
*
* Occupancy has member variables: m_A and m_B (kernel densities of positive
* and negative class, respectively) and State.
* Before using this class, set the static member variables first.
*/
class Occupancy {
friend std::ostream &operator<<(std::ostream &os, const Occupancy &oc);
friend std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc);
friend std::ifstream &operator>>(std::ifstream &is, Occupancy &oc);
friend class BGKLVOctoMap;
public:
/*
* @brief Constructors and destructor.
*/
Occupancy() : m_A(Occupancy::prior_A), m_B(Occupancy::prior_B), state(State::UNKNOWN) { classified = false; }
Occupancy(float A, float B);
Occupancy(const Occupancy &other) : m_A(other.m_A), m_B(other.m_B), state(other.state) { }
Occupancy &operator=(const Occupancy &other) {
m_A = other.m_A;
m_B = other.m_B;
state = other.state;
return *this;
}
~Occupancy() { }
/*
* @brief Exact updates for nonparametric Bayesian kernel inference
* @param ybar kernel density estimate of positive class (occupied)
* @param kbar kernel density of negative class (unoccupied)
*/
void update(float ybar, float kbar);
/// Get probability of occupancy.
float get_prob() const;
/// Get variance of occupancy (uncertainty)
float get_var() const;
/*
* @brief Get occupancy state of the node.
* @return occupancy state (see State).
*/
inline State get_state() const { return state; }
/// Prune current node; set state to PRUNED.
inline void prune() { state = State::PRUNED; }
/// Only FREE and OCCUPIED nodes can be equal.
inline bool operator==(const Occupancy &rhs) const {
return this->state != State::UNKNOWN && this->state != State::UNCERTAIN && this->state == rhs.state;
}
bool classified;
private:
float m_A;
float m_B;
State state;
static float sf2;
static float ell; // length-scale
static float min_W;
static float prior_A; // prior on alpha
static float prior_B; // prior on beta
static bool original_size;
static float free_thresh; // FREE occupancy threshold
static float occupied_thresh; // OCCUPIED occupancy threshold
static float var_thresh;
};
typedef Occupancy OcTreeNode;
}
#endif // LA3DM_BGKLV_OCCUPANCY_H
| 3,010 | 28.811881 | 117 | h |
la3dm | la3dm-master/include/bgkoctomap/bgkblock.h | #ifndef LA3DM_BGK_BLOCK_H
#define LA3DM_BGK_BLOCK_H
#include <unordered_map>
#include <array>
#include "point3f.h"
#include "bgkoctree_node.h"
#include "bgkoctree.h"
namespace la3dm {
/// Hask key to index Block given block's center.
typedef int64_t BlockHashKey;
/// Initialize Look-Up Table
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth);
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map,
unsigned short max_depth);
/// Extended Block
#ifdef PREDICT
typedef std::array<BlockHashKey, 27> ExtendedBlock;
#else
typedef std::array<BlockHashKey, 7> ExtendedBlock;
#endif
/// Convert from block to hash key.
BlockHashKey block_to_hash_key(point3f center);
/// Convert from block to hash key.
BlockHashKey block_to_hash_key(float x, float y, float z);
/// Convert from hash key to block.
point3f hash_key_to_block(BlockHashKey key);
/// Get current block's extended block.
ExtendedBlock get_extended_block(BlockHashKey key);
/*
* @brief Block is built on top of OcTree, providing the functions to locate nodes.
*
* Block stores the information needed to locate each OcTreeNode's position:
* fixed resolution, fixed block_size, both of which must be initialized.
* The localization is implemented using Loop-Up Table.
*/
class Block : public OcTree {
friend BlockHashKey block_to_hash_key(point3f center);
friend BlockHashKey block_to_hash_key(float x, float y, float z);
friend point3f hash_key_to_block(BlockHashKey key);
friend ExtendedBlock get_extended_block(BlockHashKey key);
friend class BGKOctoMap;
public:
Block();
Block(point3f center);
/// @return location of the OcTreeNode given OcTree's LeafIterator.
inline point3f get_loc(const LeafIterator &it) const {
return Block::key_loc_map[it.get_hash_key()] + center;
}
/// @return size of the OcTreeNode given OcTree's LeafIterator.
inline float get_size(const LeafIterator &it) const {
unsigned short depth, index;
hash_key_to_node(it.get_hash_key(), depth, index);
return float(size / pow(2, depth));
}
/// @return center of current Block.
inline point3f get_center() const { return center; }
/// @return min lim of current Block.
inline point3f get_lim_min() const { return center - point3f(size / 2.0f, size / 2.0f, size / 2.0f); }
/// @return max lim of current Block.
inline point3f get_lim_max() const { return center + point3f(size / 2.0f, size / 2.0f, size / 2.0f); }
/// @return ExtendedBlock of current Block.
ExtendedBlock get_extended_block() const;
OcTreeHashKey get_node(unsigned short x, unsigned short y, unsigned short z) const;
point3f get_point(unsigned short x, unsigned short y, unsigned short z) const;
void get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const;
OcTreeNode &search(float x, float y, float z) const;
OcTreeNode &search(point3f p) const;
private:
// Loop-Up Table
static std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
static std::unordered_map<unsigned short, OcTreeHashKey> index_map;
static float resolution;
static float size;
static unsigned short cell_num;
point3f center;
};
}
#endif // LA3DM_BGK_BLOCK_H
| 3,709 | 32.727273 | 131 | h |
la3dm | la3dm-master/include/bgkoctomap/bgkinference.h | #ifndef LA3DM_BGK_H
#define LA3DM_BGK_H
namespace la3dm {
/*
* @brief Bayesian Generalized Kernel Inference on Bernoulli distribution
* @param dim dimension of data (2, 3, etc.)
* @param T data type (float, double, etc.)
* @ref Nonparametric Bayesian inference on multivariate exponential families
*/
template<int dim, typename T>
class BGKInference {
public:
/// Eigen matrix type for training and test data and kernel
using MatrixXType = Eigen::Matrix<T, -1, dim, Eigen::RowMajor>;
using MatrixKType = Eigen::Matrix<T, -1, -1, Eigen::RowMajor>;
using MatrixDKType = Eigen::Matrix<T, -1, 1>;
using MatrixYType = Eigen::Matrix<T, -1, 1>;
BGKInference(T sf2, T ell) : sf2(sf2), ell(ell), trained(false) { }
/*
* @brief Fit BGK Model
* @param x input vector (3N, row major)
* @param y target vector (N)
*/
void train(const std::vector<T> &x, const std::vector<T> &y) {
assert(x.size() % dim == 0 && (int) (x.size() / dim) == y.size());
MatrixXType _x = Eigen::Map<const MatrixXType>(x.data(), x.size() / dim, dim);
MatrixYType _y = Eigen::Map<const MatrixYType>(y.data(), y.size(), 1);
train(_x, _y);
}
/*
* @brief Fit BGK Model
* @param x input matrix (NX3)
* @param y target matrix (NX1)
*/
void train(const MatrixXType &x, const MatrixYType &y) {
this->x = MatrixXType(x);
this->y = MatrixYType(y);
trained = true;
}
/*
* @brief Predict with BGK Model
* @param xs input vector (3M, row major)
* @param ybar positive class kernel density estimate (\bar{y})
* @param kbar kernel density estimate (\bar{k})
*/
void predict(const std::vector<T> &xs, std::vector<T> &ybar, std::vector<T> &kbar) const {
assert(xs.size() % dim == 0);
MatrixXType _xs = Eigen::Map<const MatrixXType>(xs.data(), xs.size() / dim, dim);
MatrixYType _ybar, _kbar;
predict(_xs, _ybar, _kbar);
ybar.resize(_ybar.rows());
kbar.resize(_kbar.rows());
for (int r = 0; r < _ybar.rows(); ++r) {
ybar[r] = _ybar(r, 0);
kbar[r] = _kbar(r, 0);
}
}
/*
* @brief Predict with nonparametric Bayesian generalized kernel inference
* @param xs input vector (M x 3)
* @param ybar positive class kernel density estimate (M x 1)
* @param kbar kernel density estimate (M x 1)
*/
void predict(const MatrixXType &xs, MatrixYType &ybar, MatrixYType &kbar) const {
assert(trained == true);
MatrixKType Ks;
covSparse(xs, x, Ks);
ybar = (Ks * y).array();
kbar = Ks.rowwise().sum().array();
}
private:
/*
* @brief Compute Euclid distances between two vectors.
* @param x input vector
* @param z input vecotr
* @return d distance matrix
*/
void dist(const MatrixXType &x, const MatrixXType &z, MatrixKType &d) const {
d = MatrixKType::Zero(x.rows(), z.rows());
for (int i = 0; i < x.rows(); ++i) {
d.row(i) = (z.rowwise() - x.row(i)).rowwise().norm();
}
}
/*
* @brief Matern3 kernel.
* @param x input vector
* @param z input vector
* @return Kxz covariance matrix
*/
void covMaterniso3(const MatrixXType &x, const MatrixXType &z, MatrixKType &Kxz) const {
dist(1.73205 / ell * x, 1.73205 / ell * z, Kxz);
Kxz = ((1 + Kxz.array()) * exp(-Kxz.array())).matrix() * sf2;
}
/*
* @brief Sparse kernel.
* @param x input vector
* @param z input vector
* @return Kxz covariance matrix
* @ref A sparse covariance function for exact gaussian process inference in large datasets.
*/
void covSparse(const MatrixXType &x, const MatrixXType &z, MatrixKType &Kxz) const {
dist(x / ell, z / ell, Kxz);
Kxz = (((2.0f + (Kxz * 2.0f * 3.1415926f).array().cos()) * (1.0f - Kxz.array()) / 3.0f) +
(Kxz * 2.0f * 3.1415926f).array().sin() / (2.0f * 3.1415926f)).matrix() * sf2;
// Clean up for values with distance outside length scale
// Possible because Kxz <= 0 when dist >= ell
for (int i = 0; i < Kxz.rows(); ++i)
{
for (int j = 0; j < Kxz.cols(); ++j)
if (Kxz(i,j) < 0.0)
Kxz(i,j) = 0.0f;
}
}
T sf2; // signal variance
T ell; // length-scale
MatrixXType x; // temporary storage of training data
MatrixYType y; // temporary storage of training labels
bool trained; // true if bgkinference stored training data
};
typedef BGKInference<3, float> BGK3f;
}
#endif // LA3DM_BGK_H
| 5,140 | 35.460993 | 101 | h |
la3dm | la3dm-master/include/bgkoctomap/bgkoctomap.h | #ifndef LA3DM_BGK_OCTOMAP_H
#define LA3DM_BGK_OCTOMAP_H
#include <unordered_map>
#include <vector>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include "rtree.h"
#include "bgkblock.h"
#include "bgkoctree_node.h"
namespace la3dm {
/// PCL PointCloud types as input
typedef pcl::PointXYZ PCLPointType;
typedef pcl::PointCloud<PCLPointType> PCLPointCloud;
/*
* @brief BGKOctoMap
*
* Bayesian Generalized Kernel Inference for Occupancy Map Prediction
* The space is partitioned by Blocks in which OcTrees with fixed
* depth are rooted. Occupancy values in one Block is predicted by
* its ExtendedBlock via Bayesian generalized kernel inference.
*/
class BGKOctoMap {
public:
/// Types used internally
typedef std::vector<point3f> PointCloud;
typedef std::pair<point3f, float> GPPointType;
typedef std::vector<GPPointType> GPPointCloud;
typedef RTree<GPPointType *, float, 3, float> MyRTree;
public:
BGKOctoMap();
/*
* @param resolution (default 0.1m)
* @param block_depth maximum depth of OcTree (default 4)
* @param sf2 signal variance in GPs (default 1.0)
* @param ell length-scale in GPs (default 1.0)
* @param noise noise variance in GPs (default 0.01)
* @param l length-scale in logistic regression function (default 100)
* @param min_var minimum variance in Occupancy (default 0.001)
* @param max_var maximum variance in Occupancy (default 1000)
* @param max_known_var maximum variance for Occuapncy to be classified as KNOWN State (default 0.02)
* @param free_thresh free threshold for Occupancy probability (default 0.3)
* @param occupied_thresh occupied threshold for Occupancy probability (default 0.7)
*/
BGKOctoMap(float resolution,
unsigned short block_depth,
float sf2,
float ell,
float free_thresh,
float occupied_thresh,
float var_thresh,
float prior_A,
float prior_B);
~BGKOctoMap();
/// Set resolution.
void set_resolution(float resolution);
/// Set block max depth.
void set_block_depth(unsigned short max_depth);
/// Get resolution.
inline float get_resolution() const { return resolution; }
/// Get block max depth.
inline float get_block_depth() const { return block_depth; }
/*
* @brief Insert PCL PointCloud into BGKOctoMaps.
* @param cloud one scan in PCLPointCloud format
* @param origin sensor origin in the scan
* @param ds_resolution downsampling resolution for PCL VoxelGrid filtering (-1 if no downsampling)
* @param free_res resolution for sampling free training points along sensor beams (default 2.0)
* @param max_range maximum range for beams to be considered as valid measurements (-1 if no limitation)
*/
void insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res = 2.0f,
float max_range = -1);
void insert_training_data(const GPPointCloud &cloud);
/// Get bounding box of the map.
void get_bbox(point3f &lim_min, point3f &lim_max) const;
class RayCaster {
public:
RayCaster(const BGKOctoMap *map, const point3f &start, const point3f &end) : map(map) {
assert(map != nullptr);
_block_key = block_to_hash_key(start);
block = map->search(_block_key);
lim = static_cast<unsigned short>(pow(2, map->block_depth - 1));
if (block != nullptr) {
block->get_index(start, x, y, z);
block_lim = block->get_center();
block_size = block->size;
current_p = start;
resolution = map->resolution;
int x0 = static_cast<int>((start.x() / resolution));
int y0 = static_cast<int>((start.y() / resolution));
int z0 = static_cast<int>((start.z() / resolution));
int x1 = static_cast<int>((end.x() / resolution));
int y1 = static_cast<int>((end.y() / resolution));
int z1 = static_cast<int>((end.z() / resolution));
dx = abs(x1 - x0);
dy = abs(y1 - y0);
dz = abs(z1 - z0);
n = 1 + dx + dy + dz;
x_inc = x1 > x0 ? 1 : (x1 == x0 ? 0 : -1);
y_inc = y1 > y0 ? 1 : (y1 == y0 ? 0 : -1);
z_inc = z1 > z0 ? 1 : (z1 == z0 ? 0 : -1);
xy_error = dx - dy;
xz_error = dx - dz;
yz_error = dy - dz;
dx *= 2;
dy *= 2;
dz *= 2;
} else {
n = 0;
}
}
inline bool end() const { return n <= 0; }
bool next(point3f &p, OcTreeNode &node, BlockHashKey &block_key, OcTreeHashKey &node_key) {
assert(!end());
bool valid = false;
unsigned short index = x + y * lim + z * lim * lim;
node_key = Block::index_map[index];
block_key = _block_key;
if (block != nullptr) {
valid = true;
node = (*block)[node_key];
current_p = block->get_point(x, y, z);
p = current_p;
} else {
p = current_p;
}
if (xy_error > 0 && xz_error > 0) {
x += x_inc;
current_p.x() += x_inc * resolution;
xy_error -= dy;
xz_error -= dz;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error < 0 && yz_error > 0) {
y += y_inc;
current_p.y() += y_inc * resolution;
xy_error += dx;
yz_error -= dz;
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
} else if (yz_error < 0 && xz_error < 0) {
z += z_inc;
current_p.z() += z_inc * resolution;
xz_error += dx;
yz_error += dy;
if (z >= lim || z < 0) {
block_lim.z() += z_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
z = z_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error == 0) {
x += x_inc;
y += y_inc;
n -= 2;
current_p.x() += x_inc * resolution;
current_p.y() += y_inc * resolution;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
}
n--;
return valid;
}
private:
const BGKOctoMap *map;
Block *block;
point3f block_lim;
float block_size, resolution;
int dx, dy, dz, error, n;
int x_inc, y_inc, z_inc, xy_error, xz_error, yz_error;
unsigned short index, x, y, z, lim;
BlockHashKey _block_key;
point3f current_p;
};
/// LeafIterator for iterating all leaf nodes in blocks
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator(const BGKOctoMap *map) {
assert(map != nullptr);
block_it = map->block_arr.cbegin();
end_block = map->block_arr.cend();
if (map->block_arr.size() > 0) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
} else {
leaf_it = OcTree::LeafIterator();
end_leaf = OcTree::LeafIterator();
}
}
// just for initializing end iterator
LeafIterator(std::unordered_map<BlockHashKey, Block *>::const_iterator block_it,
OcTree::LeafIterator leaf_it)
: block_it(block_it), leaf_it(leaf_it), end_block(block_it), end_leaf(leaf_it) { }
bool operator==(const LeafIterator &other) {
return (block_it == other.block_it) && (leaf_it == other.leaf_it);
}
bool operator!=(const LeafIterator &other) {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
++leaf_it;
if (leaf_it == end_leaf) {
++block_it;
if (block_it != end_block) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
}
}
return *this;
}
OcTreeNode &operator*() const {
return *leaf_it;
}
std::vector<point3f> get_pruned_locs() const {
std::vector<point3f> pruned_locs;
point3f center = get_loc();
float size = get_size();
float x0 = center.x() - size * 0.5 + Block::resolution * 0.5;
float y0 = center.y() - size * 0.5 + Block::resolution * 0.5;
float z0 = center.z() - size * 0.5 + Block::resolution * 0.5;
float x1 = center.x() + size * 0.5;
float y1 = center.y() + size * 0.5;
float z1 = center.z() + size * 0.5;
for (float x = x0; x < x1; x += Block::resolution) {
for (float y = y0; y < y1; y += Block::resolution) {
for (float z = z0; z < z1; z += Block::resolution) {
pruned_locs.emplace_back(x, y, z);
}
}
}
return pruned_locs;
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline point3f get_loc() const {
return block_it->second->get_loc(leaf_it);
}
inline float get_size() const {
return block_it->second->get_size(leaf_it);
}
private:
std::unordered_map<BlockHashKey, Block *>::const_iterator block_it;
std::unordered_map<BlockHashKey, Block *>::const_iterator end_block;
OcTree::LeafIterator leaf_it;
OcTree::LeafIterator end_leaf;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); }
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(block_arr.cend(), OcTree::LeafIterator()); }
OcTreeNode search(point3f p) const;
OcTreeNode search(float x, float y, float z) const;
Block *search(BlockHashKey key) const;
inline float get_block_size() const { return block_size; }
private:
/// @return true if point is inside a bounding box given min and max limits.
inline bool gp_point_in_bbox(const GPPointType &p, const point3f &lim_min, const point3f &lim_max) const {
return (p.first.x() > lim_min.x() && p.first.x() < lim_max.x() &&
p.first.y() > lim_min.y() && p.first.y() < lim_max.y() &&
p.first.z() > lim_min.z() && p.first.z() < lim_max.z());
}
/// Get the bounding box of a pointcloud.
void bbox(const GPPointCloud &cloud, point3f &lim_min, point3f &lim_max) const;
/// Get all block indices inside a bounding box.
void get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
std::vector<BlockHashKey> &blocks) const;
/// Get all points inside a bounding box assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
GPPointCloud &out);
/// @return true if point exists inside a bounding box assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max);
/// Get all points inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const BlockHashKey &key, GPPointCloud &out);
/// @return true if point exists inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const BlockHashKey &key);
/// Get all points inside an extended block assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const ExtendedBlock &block, GPPointCloud &out);
/// @return true if point exists inside an extended block assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const ExtendedBlock &block);
/// RTree callback function
static bool count_callback(GPPointType *p, void *arg);
/// RTree callback function
static bool search_callback(GPPointType *p, void *arg);
/// Downsample PCLPointCloud using PCL VoxelGrid Filtering.
void downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const;
/// Sample free training points along sensor beams.
void beam_sample(const point3f &hits, const point3f &origin, PointCloud &frees,
float free_resolution) const;
/// Get training data from one sensor scan.
void get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPPointCloud &xy) const;
float resolution;
float block_size;
unsigned short block_depth;
std::unordered_map<BlockHashKey, Block *> block_arr;
MyRTree rtree;
};
}
#endif // LA3DM_BGKOCTOMAP_H
| 15,848 | 40.273438 | 125 | h |
la3dm | la3dm-master/include/bgkoctomap/bgkoctree.h | #ifndef LA3DM_BGK_OCTREE_H
#define LA3DM_BGK_OCTREE_H
#include <stack>
#include <vector>
#include "point3f.h"
#include "bgkoctree_node.h"
namespace la3dm {
/// Hash key to index OcTree nodes given depth and the index in that layer.
typedef int OcTreeHashKey;
/// Convert from node to hask key.
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned short index);
/// Convert from hash key to node.
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned short &index);
/*
* @brief A simple OcTree to organize occupancy data in one block.
*
* OcTree doesn't store positions of nodes in order to reduce memory usage.
* The nodes in OcTrees are indexed by OcTreeHashKey which can be used to
* retrieve positions later (See Block).
* For the purpose of mapping, this OcTree has fixed depth which should be
* set before using OcTrees.
*/
class OcTree {
friend class BGKOctoMap;
public:
OcTree();
~OcTree();
OcTree(const OcTree &other);
OcTree &operator=(const OcTree &other);
/*
* @brief Rursively pruning OcTreeNodes with the same state.
*
* Prune nodes by setting nodes to PRUNED.
* Delete the layer if all nodes are pruned.
*/
bool prune();
/// @return true if this node is a leaf node.
bool is_leaf(OcTreeHashKey key) const;
/// @return true if this node is a leaf node.
bool is_leaf(unsigned short depth, unsigned short index) const;
/// @return true if this node exists and is not pruned.
bool search(OcTreeHashKey key) const;
/// @return Occupancy of the node (without checking if it exists!)
OcTreeNode &operator[](OcTreeHashKey key) const;
/// Leaf iterator for OcTrees: iterate all leaf nodes not pruned.
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator() : tree(nullptr) { }
LeafIterator(const OcTree *tree)
: tree(tree != nullptr && tree->node_arr != nullptr ? tree : nullptr) {
if (tree != nullptr) {
stack.emplace(0, 0);
stack.emplace(0, 0);
++(*this);
}
}
LeafIterator(const LeafIterator &other) : tree(other.tree), stack(other.stack) { }
LeafIterator &operator=(const LeafIterator &other) {
tree = other.tree;
stack = other.stack;
return *this;
}
bool operator==(const LeafIterator &other) const {
return (tree == other.tree) &&
(stack.size() == other.stack.size()) &&
(stack.size() == 0 || (stack.size() > 0 &&
(stack.top().depth == other.stack.top().depth) &&
(stack.top().index == other.stack.top().index)));
}
bool operator!=(const LeafIterator &other) const {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
if (stack.empty()) {
tree = nullptr;
} else {
stack.pop();
while (!stack.empty() && !tree->is_leaf(stack.top().depth, stack.top().index))
single_inc();
if (stack.empty())
tree = nullptr;
}
return *this;
}
inline OcTreeNode &operator*() const {
return (*tree)[get_hash_key()];
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline OcTreeHashKey get_hash_key() const {
OcTreeHashKey key = node_to_hash_key(stack.top().depth, stack.top().index);
return key;
}
protected:
void single_inc() {
StackElement top(stack.top());
stack.pop();
for (int i = 0; i < 8; ++i) {
stack.emplace(top.depth + 1, top.index * 8 + i);
}
}
struct StackElement {
unsigned short depth;
unsigned short index;
StackElement(unsigned short depth, unsigned short index)
: depth(depth), index(index) { }
};
const OcTree *tree;
std::stack<StackElement, std::vector<StackElement> > stack;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); };
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(nullptr); };
private:
OcTreeNode **node_arr;
static unsigned short max_depth;
};
}
#endif // LA3DM_BGK_OCTREE_H
| 5,276 | 31.574074 | 98 | h |
la3dm | la3dm-master/include/bgkoctomap/bgkoctree_node.h | #ifndef LA3DM_BGK_OCCUPANCY_H
#define LA3DM_BGK_OCCUPANCY_H
#include <iostream>
#include <fstream>
namespace la3dm {
/// Occupancy state: before pruning: FREE, OCCUPIED, UNKNOWN; after pruning: PRUNED
enum class State : char {
FREE, OCCUPIED, UNKNOWN, PRUNED
};
/*
* @brief Inference ouputs and occupancy state.
*
* Occupancy has member variables: m_A and m_B (kernel densities of positive
* and negative class, respectively) and State.
* Before using this class, set the static member variables first.
*/
class Occupancy {
friend std::ostream &operator<<(std::ostream &os, const Occupancy &oc);
friend std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc);
friend std::ifstream &operator>>(std::ifstream &is, Occupancy &oc);
friend class BGKOctoMap;
public:
/*
* @brief Constructors and destructor.
*/
Occupancy() : m_A(Occupancy::prior_A), m_B(Occupancy::prior_B), state(State::UNKNOWN) { classified = false; }
Occupancy(float A, float B);
Occupancy(const Occupancy &other) : m_A(other.m_A), m_B(other.m_B), state(other.state) { }
Occupancy &operator=(const Occupancy &other) {
m_A = other.m_A;
m_B = other.m_B;
state = other.state;
return *this;
}
~Occupancy() { }
/*
* @brief Exact updates for nonparametric Bayesian kernel inference
* @param ybar kernel density estimate of positive class (occupied)
* @param kbar kernel density of negative class (unoccupied)
*/
void update(float ybar, float kbar);
/// Get probability of occupancy.
float get_prob() const;
/// Get variance of occupancy (uncertainty)
inline float get_var() const { return (m_A * m_B) / ( (m_A + m_B) * (m_A + m_B) * (m_A + m_B + 1.0f)); }
/*
* @brief Get occupancy state of the node.
* @return occupancy state (see State).
*/
inline State get_state() const { return state; }
/// Prune current node; set state to PRUNED.
inline void prune() { state = State::PRUNED; }
/// Only FREE and OCCUPIED nodes can be equal.
inline bool operator==(const Occupancy &rhs) const {
return this->state != State::UNKNOWN && this->state == rhs.state;
}
bool classified;
private:
float m_A;
float m_B;
State state;
static float sf2;
static float ell; // length-scale
static float prior_A; // prior on alpha
static float prior_B; // prior on beta
static float free_thresh; // FREE occupancy threshold
static float occupied_thresh; // OCCUPIED occupancy threshold
static float var_thresh;
};
typedef Occupancy OcTreeNode;
}
#endif // LA3DM_BGK_OCCUPANCY_H
| 2,946 | 29.071429 | 117 | h |
la3dm | la3dm-master/include/common/markerarray_pub.h | #include <pcl_ros/point_cloud.h>
#include <geometry_msgs/Point.h>
#include <visualization_msgs/MarkerArray.h>
#include <visualization_msgs/Marker.h>
#include <std_msgs/ColorRGBA.h>
#include <cmath>
#include <string>
namespace la3dm {
std_msgs::ColorRGBA heightMapColor(double h) {
std_msgs::ColorRGBA color;
color.a = 1.0;
// blend over HSV-values (more colors)
double s = 1.0;
double v = 1.0;
h -= floor(h);
h *= 6;
int i;
double m, n, f;
i = floor(h);
f = h - i;
if (!(i & 1))
f = 1 - f; // if i is even
m = v * (1 - s);
n = v * (1 - s * f);
switch (i) {
case 6:
case 0:
color.r = v;
color.g = n;
color.b = m;
break;
case 1:
color.r = n;
color.g = v;
color.b = m;
break;
case 2:
color.r = m;
color.g = v;
color.b = n;
break;
case 3:
color.r = m;
color.g = n;
color.b = v;
break;
case 4:
color.r = n;
color.g = m;
color.b = v;
break;
case 5:
color.r = v;
color.g = m;
color.b = n;
break;
default:
color.r = 1;
color.g = 0.5;
color.b = 0.5;
break;
}
return color;
}
class MarkerArrayPub {
typedef pcl::PointXYZ PointType;
typedef pcl::PointCloud<PointType> PointCloud;
public:
MarkerArrayPub(ros::NodeHandle nh, std::string topic, float resolution) : nh(nh),
msg(new visualization_msgs::MarkerArray),
topic(topic),
resolution(resolution),
markerarray_frame_id("map") {
pub = nh.advertise<visualization_msgs::MarkerArray>(topic, 1, true);
msg->markers.resize(10);
for (int i = 0; i < 10; ++i) {
msg->markers[i].header.frame_id = markerarray_frame_id;
msg->markers[i].ns = "map";
msg->markers[i].id = i;
msg->markers[i].type = visualization_msgs::Marker::CUBE_LIST;
msg->markers[i].scale.x = resolution * pow(2, i);
msg->markers[i].scale.y = resolution * pow(2, i);
msg->markers[i].scale.z = resolution * pow(2, i);
std_msgs::ColorRGBA color;
color.r = 0.0;
color.g = 0.0;
color.b = 1.0;
color.a = 1.0;
msg->markers[i].color = color;
}
}
void insert_point3d(float x, float y, float z, float min_z, float max_z, float size) {
geometry_msgs::Point center;
center.x = x;
center.y = y;
center.z = z;
int depth = 0;
if (size > 0)
depth = (int) log2(size /resolution);
msg->markers[depth].points.push_back(center);
if (min_z < max_z) {
double h = (1.0 - std::min(std::max((z - min_z) / (max_z - min_z), 0.0f), 1.0f)) * 0.8;
msg->markers[depth].colors.push_back(heightMapColor(h));
}
}
void insert_point3d(float x, float y, float z, float min_z, float max_z, float size, float prob) {
geometry_msgs::Point center;
center.x = x;
center.y = y;
center.z = z;
int depth = 0;
if (size > 0)
depth = (int) log2(size / resolution);
msg->markers[depth].points.push_back(center);
std_msgs::ColorRGBA color;
color.a = 1.0;
if(prob < 0.5){
color.r = 0.8;
color.g = 0.8;
color.b = 0.8;
}
else{
color = heightMapColor(std::min(2.0-2.0*prob, 0.6));
}
msg->markers[depth].colors.push_back(color);
}
void insert_point3d(float x, float y, float z, float min_z, float max_z) {
insert_point3d(x, y, z, min_z, max_z, -1.0f);
}
void insert_point3d(float x, float y, float z) {
insert_point3d(x, y, z, 1.0f, 0.0f, -1.0f);
}
void insert_color_point3d(float x, float y, float z, double min_v, double max_v, double v) {
geometry_msgs::Point center;
center.x = x;
center.y = y;
center.z = z;
int depth = 0;
msg->markers[depth].points.push_back(center);
double h = (1.0 - std::min(std::max((v - min_v) / (max_v - min_v), 0.0), 1.0)) * 0.8;
msg->markers[depth].colors.push_back(heightMapColor(h));
}
void clear() {
for (int i = 0; i < 10; ++i) {
msg->markers[i].points.clear();
msg->markers[i].colors.clear();
}
}
void publish() const {
msg->markers[0].header.stamp = ros::Time::now();
pub.publish(*msg);
}
private:
ros::NodeHandle nh;
ros::Publisher pub;
visualization_msgs::MarkerArray::Ptr msg;
std::string markerarray_frame_id;
std::string topic;
float resolution;
};
}
| 5,869 | 29.572917 | 123 | h |
la3dm | la3dm-master/include/common/point3f.h | #ifndef LA3DM_VECTOR3_H
#define LA3DM_VECTOR3_H
#include <iostream>
#include <math.h>
namespace la3dm {
/*!
* \brief This class represents a three-dimensional vector
*
* The three-dimensional vector can be used to represent a
* translation in three-dimensional space or to represent the
* attitude of an object using Euler angle.
*/
class Vector3 {
public:
/*!
* \brief Default constructor
*/
Vector3() { data[0] = data[1] = data[2] = 0.0; }
/*!
* \brief Copy constructor
*
* @param other a vector of dimension 3
*/
Vector3(const Vector3 &other) {
data[0] = other(0);
data[1] = other(1);
data[2] = other(2);
}
/*!
* \brief Constructor
*
* Constructs a three-dimensional vector from
* three single values x, y, z or roll, pitch, yaw
*/
Vector3(float x, float y, float z) {
data[0] = x;
data[1] = y;
data[2] = z;
}
/* inline Eigen3::Vector3f getVector3f() const { return Eigen3::Vector3f(data[0], data[1], data[2]) ; } */
/* inline Eigen3::Vector4f& getVector4f() { return data; } */
/* inline Eigen3::Vector4f getVector4f() const { return data; } */
/*!
* \brief Assignment operator
*
* @param other a vector of dimension 3
*/
inline Vector3 &operator=(const Vector3 &other) {
data[0] = other(0);
data[1] = other(1);
data[2] = other(2);
return *this;
}
/*!
* \brief Three-dimensional vector (cross) product
*
* Calculates the tree-dimensional cross product, which
* represents the vector orthogonal to the plane defined
* by this and other.
* @return this x other
*/
inline Vector3 cross(const Vector3 &other) const {
//return (data.start<3> ().cross (other.data.start<3> ()));
// \note should this be renamed?
return Vector3(y() * other.z() - z() * other.y(),
z() * other.x() - x() * other.z(),
x() * other.y() - y() * other.x());
}
/// dot product
inline double dot(const Vector3 &other) const {
return x() * other.x() + y() * other.y() + z() * other.z();
}
inline const float &operator()(unsigned int i) const {
return data[i];
}
inline float &operator()(unsigned int i) {
return data[i];
}
inline float &x() {
return operator()(0);
}
inline float &y() {
return operator()(1);
}
inline float &z() {
return operator()(2);
}
inline const float &x() const {
return operator()(0);
}
inline const float &y() const {
return operator()(1);
}
inline const float &z() const {
return operator()(2);
}
inline float &roll() {
return operator()(0);
}
inline float &pitch() {
return operator()(1);
}
inline float &yaw() {
return operator()(2);
}
inline const float &roll() const {
return operator()(0);
}
inline const float &pitch() const {
return operator()(1);
}
inline const float &yaw() const {
return operator()(2);
}
inline Vector3 operator-() const {
Vector3 result;
result(0) = -data[0];
result(1) = -data[1];
result(2) = -data[2];
return result;
}
inline Vector3 operator+(const Vector3 &other) const {
Vector3 result(*this);
result(0) += other(0);
result(1) += other(1);
result(2) += other(2);
return result;
}
inline Vector3 operator*(float x) const {
Vector3 result(*this);
result(0) *= x;
result(1) *= x;
result(2) *= x;
return result;
}
inline Vector3 operator-(const Vector3 &other) const {
Vector3 result(*this);
result(0) -= other(0);
result(1) -= other(1);
result(2) -= other(2);
return result;
}
inline void operator+=(const Vector3 &other) {
data[0] += other(0);
data[1] += other(1);
data[2] += other(2);
}
inline void operator-=(const Vector3 &other) {
data[0] -= other(0);
data[1] -= other(1);
data[2] -= other(2);
}
inline void operator/=(float x) {
data[0] /= x;
data[1] /= x;
data[2] /= x;
}
inline void operator*=(float x) {
data[0] *= x;
data[1] *= x;
data[2] *= x;
}
inline bool operator==(const Vector3 &other) const {
for (unsigned int i = 0; i < 3; i++) {
if (operator()(i) != other(i))
return false;
}
return true;
}
/// @return length of the vector ("L2 norm")
inline double norm() const {
return sqrt(norm_sq());
}
/// @return squared length ("L2 norm") of the vector
inline double norm_sq() const {
return (x() * x() + y() * y() + z() * z());
}
/// normalizes this vector, so that it has norm=1.0
inline Vector3 &normalize() {
double len = norm();
if (len > 0)
*this /= (float) len;
return *this;
}
/// @return normalized vector, this one remains unchanged
inline Vector3 normalized() const {
Vector3 result(*this);
result.normalize();
return result;
}
inline double angleTo(const Vector3 &other) const {
double dot_prod = this->dot(other);
double len1 = this->norm();
double len2 = other.norm();
return acos(dot_prod / (len1 * len2));
}
inline double distance(const Vector3 &other) const {
double dist_x = x() - other.x();
double dist_y = y() - other.y();
double dist_z = z() - other.z();
return sqrt(dist_x * dist_x + dist_y * dist_y + dist_z * dist_z);
}
inline double distanceXY(const Vector3 &other) const {
double dist_x = x() - other.x();
double dist_y = y() - other.y();
return sqrt(dist_x * dist_x + dist_y * dist_y);
}
Vector3 &rotate_IP(double roll, double pitch, double yaw);
// void read (unsigned char * src, unsigned int size);
std::istream &read(std::istream &s);
std::ostream &write(std::ostream &s) const;
std::istream &readBinary(std::istream &s);
std::ostream &writeBinary(std::ostream &s) const;
protected:
float data[3];
};
//! user friendly output in format (x y z)
std::ostream &operator<<(std::ostream &out, la3dm::Vector3 const &v);
typedef Vector3 point3f;
}
#endif // LA3DM_VECTOR3_H
| 7,471 | 25.974729 | 114 | h |
la3dm | la3dm-master/include/common/point6f.h | #ifndef LA3DM_VECTOR6_H
#define LA3DM_VECTOR6_H
#include <iostream>
#include <math.h>
#include "point3f.h"
namespace la3dm {
/*!
* \brief This class represents a six-dimensional vector
*
* We use the six-dimensional vector to represent the start
* and end points of a line segment
*/
class Vector6 {
public:
/*!
* \brief Default constructor
*/
Vector6() { data[0] = data[1] = data[2] = data[3] = data[4] = data[5] = 0.0; }
/*!
* \brief Copy constructor
*
* @param other a vector of dimension 6
*/
Vector6(const Vector6 &other) {
data[0] = other(0);
data[1] = other(1);
data[2] = other(2);
data[3] = other(3);
data[4] = other(4);
data[5] = other(5);
}
/*!
* \brief 6-D vector as 2 copies of a 3-D vector
*
* @param point a vector of dimension 3
*/
Vector6(const Vector3 &point) {
data[0] = data[3] = point(0);
data[1] = data[4] = point(1);
data[2] = data[5] = point(2);
}
/*!
* \brief 6-D vector from start and endpoint of a line
*
* @param start a vector of dimension 3
* @param end a vector of dimension 3
*/
Vector6(const Vector3 &start, const Vector3 &end) {
data[0] = start(0);
data[1] = start(1);
data[2] = start(2);
data[3] = end(0);
data[4] = end(1);
data[5] = end(2);
}
/*!
* \brief Constructor
*
* Constructs a six-dimensional vector from
* three single values x, y, z by duplication
*/
Vector6(float x0, float y0, float z0) {
data[0] = x0;
data[1] = y0;
data[2] = z0;
data[3] = x0;
data[4] = y0;
data[5] = z0;
}
/*!
* \brief Constructor
*
* Constructs a six-dimensional vector from
* six single values
*/
Vector6(float x0, float y0, float z0, float x1, float y1, float z1) {
data[0] = x0;
data[1] = y0;
data[2] = z0;
data[3] = x1;
data[4] = y1;
data[5] = z1;
}
/* inline Eigen3::Vector6f getVector6f() const { return Eigen3::Vector6f(data[0], data[1], data[2]) ; } */
/* inline Eigen3::Vector4f& getVector4f() { return data; } */
/* inline Eigen3::Vector4f getVector4f() const { return data; } */
/*!
* \brief Assignment operator
*
* @param other a vector of dimension 6
*/
inline Vector6 &operator=(const Vector6 &other) {
data[0] = other(0);
data[1] = other(1);
data[2] = other(2);
data[3] = other(3);
data[4] = other(4);
data[5] = other(5);
return *this;
}
/// dot product
inline double dot(const Vector6 &other) const {
return x0() * other.x0() + y0() * other.y0() + z0() * other.z0() + x1() * other.x1() + y1() * other.y1() + z1() * other.z1();
}
inline const float &operator()(unsigned int i) const {
return data[i];
}
inline float &operator()(unsigned int i) {
return data[i];
}
inline point3f start() {
return point3f(x0(), y0(), z0());
}
inline point3f end() {
return point3f(x1(), y1(), z1());
}
inline float &x0() {
return operator()(0);
}
inline float &y0() {
return operator()(1);
}
inline float &z0() {
return operator()(2);
}
inline float &x1() {
return operator()(3);
}
inline float &y1() {
return operator()(4);
}
inline float &z1() {
return operator()(5);
}
inline const point3f start() const {
return point3f(x0(), y0(), z0());
}
inline const point3f end() const {
return point3f(x1(), y1(), z1());
}
inline const float &x0() const {
return operator()(0);
}
inline const float &y0() const {
return operator()(1);
}
inline const float &z0() const {
return operator()(2);
}
inline const float &x1() const {
return operator()(3);
}
inline const float &y1() const {
return operator()(4);
}
inline const float &z1() const {
return operator()(5);
}
inline Vector6 operator-() const {
Vector6 result;
result(0) = -data[0];
result(1) = -data[1];
result(2) = -data[2];
result(3) = -data[3];
result(4) = -data[4];
result(5) = -data[5];
return result;
}
inline Vector6 operator+(const Vector6 &other) const {
Vector6 result(*this);
result(0) += other(0);
result(1) += other(1);
result(2) += other(2);
result(3) += other(3);
result(4) += other(4);
result(5) += other(5);
return result;
}
inline Vector6 operator*(float x) const {
Vector6 result(*this);
result(0) *= x;
result(1) *= x;
result(2) *= x;
result(3) *= x;
result(4) *= x;
result(5) *= x;
return result;
}
inline Vector6 operator-(const Vector6 &other) const {
Vector6 result(*this);
result(0) -= other(0);
result(1) -= other(1);
result(2) -= other(2);
result(3) -= other(3);
result(4) -= other(4);
result(5) -= other(5);
return result;
}
inline void operator+=(const Vector6 &other) {
data[0] += other(0);
data[1] += other(1);
data[2] += other(2);
data[3] += other(3);
data[4] += other(4);
data[5] += other(5);
}
inline void operator-=(const Vector6 &other) {
data[0] -= other(0);
data[1] -= other(1);
data[2] -= other(2);
data[3] -= other(3);
data[4] -= other(4);
data[5] -= other(5);
}
inline void operator/=(float x) {
data[0] /= x;
data[1] /= x;
data[2] /= x;
data[3] /= x;
data[4] /= x;
data[5] /= x;
}
inline void operator*=(float x) {
data[0] *= x;
data[1] *= x;
data[2] *= x;
data[3] *= x;
data[4] *= x;
data[5] *= x;
}
inline bool operator==(const Vector6 &other) const {
for (unsigned int i = 0; i < 6; i++) {
if (operator()(i) != other(i))
return false;
}
return true;
}
/// @return length of the line segment start -> end
inline double line_length() const {
return sqrt((start() - end()).norm_sq());
}
/// @return length of the vector ("L2 norm")
inline double norm() const {
return sqrt(norm_sq());
}
/// @return squared length ("L2 norm") of the vector
inline double norm_sq() const {
return (x0() * x0() + y0() * y0() + z0() * z0() + x1() * x1() + y1() * y1() + z1() * z1());
}
/// normalizes this vector, so that it has norm=1.0
inline Vector6 &normalize() {
double len = norm();
if (len > 0)
*this /= (float) len;
return *this;
}
/// @return normalized vector, this one remains unchanged
inline Vector6 normalized() const {
Vector6 result(*this);
result.normalize();
return result;
}
// inline double angleTo(const Vector6 &other) const {
// double dot_prod = this->dot(other);
// double len1 = this->norm();
// double len2 = other.norm();
// return acos(dot_prod / (len1 * len2));
// }
// inline double distance(const Vector6 &other) const {
// double dist_x = x() - other.x();
// double dist_y = y() - other.y();
// double dist_z = z() - other.z();
// return sqrt(dist_x * dist_x + dist_y * dist_y + dist_z * dist_z);
// }
// inline double distanceXY(const Vector6 &other) const {
// double dist_x = x() - other.x();
// double dist_y = y() - other.y();
// return sqrt(dist_x * dist_x + dist_y * dist_y);
// }
// Vector6 &rotate_IP(double roll, double pitch, double yaw);
// void read (unsigned char * src, unsigned int size);
std::istream &read(std::istream &s);
std::ostream &write(std::ostream &s) const;
std::istream &readBinary(std::istream &s);
std::ostream &writeBinary(std::ostream &s) const;
protected:
float data[6];
};
//! user friendly output in format (x0 y0 z0 x1 y1 z1)
std::ostream &operator<<(std::ostream &out, la3dm::Vector6 const &v);
typedef Vector6 point6f;
}
#endif // LA3DM_VECTOR6_H
| 9,678 | 26.188202 | 137 | h |
la3dm | la3dm-master/include/common/rtree.h | #ifndef RTREE_H
#define RTREE_H
// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification.
// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
#include <algorithm>
#define ASSERT assert // RTree uses ASSERT( condition )
//#ifndef Min
// #define Min std::min
//#endif //Min
//#ifndef Max
// #define Max std::max
//#endif //Max
//
// RTree.h
//
#define RTREE_TEMPLATE template<class DATATYPE, class ELEMTYPE, int NUMDIMS, class ELEMTYPEREAL, int TMAXNODES, int TMINNODES>
#define RTREE_QUAL RTree<DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES>
#define RTREE_DONT_USE_MEMPOOLS // This version does not contain a fixed memory allocator, fill in lines with EXAMPLE to implement one.
#define RTREE_USE_SPHERICAL_VOLUME // Better split classification, may be slower on some systems
// Fwd decl
class RTFileStream; // File I/O helper class, look below for implementation and notes.
/// \class RTree
/// Implementation of RTree, a multidimensional bounding rectangle tree.
/// Example usage: For a 3-dimensional tree use RTree<Object*, float, 3> myTree;
///
/// This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com)
///
/// DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof<void*> and simple type
/// ELEMTYPE Type of element such as int or float
/// NUMDIMS Number of dimensions such as 2 or 3
/// ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs
///
/// NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle.
/// This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency.
/// Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory
/// array similar to MFC CArray or STL Vector for returning search query result.
///
template<class DATATYPE, class ELEMTYPE, int NUMDIMS,
class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
class RTree
{
protected:
struct Node; // Fwd decl. Used by other internal structs and iterator
public:
// These constant must be declared after Branch and before Node struct
// Stuck up here for MSVC 6 compiler. NSVC .NET 2003 is much happier.
enum
{
MAXNODES = TMAXNODES, ///< Max elements in node
MINNODES = TMINNODES, ///< Min elements in node
};
typedef bool (*t_resultCallback)(DATATYPE, void*);
public:
RTree();
virtual ~RTree();
/// Insert entry
/// \param a_min Min of bounding rect
/// \param a_max Max of bounding rect
/// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed.
void Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
/// Remove entry
/// \param a_min Min of bounding rect
/// \param a_max Max of bounding rect
/// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed.
void Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId);
/// Find all within search rectangle
/// \param a_min Min of search bounding rect
/// \param a_max Max of search bounding rect
/// \param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array.
/// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching
/// \param a_context User context to pass as parameter to a_resultCallback
/// \return Returns the number of entries found
int Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], t_resultCallback a_resultCallback, void* a_context);
/// Remove all entries from tree
void RemoveAll();
/// Count the data elements in this container. This is slow as no internal counter is maintained.
int Count();
/// Load tree contents from file
bool Load(const char* a_fileName);
/// Load tree contents from stream
bool Load(RTFileStream& a_stream);
/// Save tree contents to file
bool Save(const char* a_fileName);
/// Save tree contents to stream
bool Save(RTFileStream& a_stream);
/// Iterator is not remove safe.
class Iterator
{
private:
enum { MAX_STACK = 32 }; // Max stack size. Allows almost n^32 where n is number of branches in node
struct StackElement
{
Node* m_node;
int m_branchIndex;
};
public:
Iterator() { Init(); }
~Iterator() { }
/// Is iterator invalid
bool IsNull() { return (m_tos <= 0); }
/// Is iterator pointing to valid data
bool IsNotNull() { return (m_tos > 0); }
/// Access the current data element. Caller must be sure iterator is not NULL first.
DATATYPE& operator*()
{
ASSERT(IsNotNull());
StackElement& curTos = m_stack[m_tos - 1];
return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
}
/// Access the current data element. Caller must be sure iterator is not NULL first.
const DATATYPE& operator*() const
{
ASSERT(IsNotNull());
StackElement& curTos = m_stack[m_tos - 1];
return curTos.m_node->m_branch[curTos.m_branchIndex].m_data;
}
/// Find the next data element
bool operator++() { return FindNextData(); }
/// Get the bounds for this node
void GetBounds(ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS])
{
ASSERT(IsNotNull());
StackElement& curTos = m_stack[m_tos - 1];
Branch& curBranch = curTos.m_node->m_branch[curTos.m_branchIndex];
for(int index = 0; index < NUMDIMS; ++index)
{
a_min[index] = curBranch.m_rect.m_min[index];
a_max[index] = curBranch.m_rect.m_max[index];
}
}
private:
/// Reset iterator
void Init() { m_tos = 0; }
/// Find the next data element in the tree (For internal use only)
bool FindNextData()
{
for(;;)
{
if(m_tos <= 0)
{
return false;
}
StackElement curTos = Pop(); // Copy stack top cause it may change as we use it
if(curTos.m_node->IsLeaf())
{
// Keep walking through data while we can
if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
{
// There is more data, just point to the next one
Push(curTos.m_node, curTos.m_branchIndex + 1);
return true;
}
// No more data, so it will fall back to previous level
}
else
{
if(curTos.m_branchIndex+1 < curTos.m_node->m_count)
{
// Push sibling on for future tree walk
// This is the 'fall back' node when we finish with the current level
Push(curTos.m_node, curTos.m_branchIndex + 1);
}
// Since cur node is not a leaf, push first of next level to get deeper into the tree
Node* nextLevelnode = curTos.m_node->m_branch[curTos.m_branchIndex].m_child;
Push(nextLevelnode, 0);
// If we pushed on a new leaf, exit as the data is ready at TOS
if(nextLevelnode->IsLeaf())
{
return true;
}
}
}
}
/// Push node and branch onto iteration stack (For internal use only)
void Push(Node* a_node, int a_branchIndex)
{
m_stack[m_tos].m_node = a_node;
m_stack[m_tos].m_branchIndex = a_branchIndex;
++m_tos;
ASSERT(m_tos <= MAX_STACK);
}
/// Pop element off iteration stack (For internal use only)
StackElement& Pop()
{
ASSERT(m_tos > 0);
--m_tos;
return m_stack[m_tos];
}
StackElement m_stack[MAX_STACK]; ///< Stack as we are doing iteration instead of recursion
int m_tos; ///< Top Of Stack index
friend class RTree; // Allow hiding of non-public functions while allowing manipulation by logical owner
};
/// Get 'first' for iteration
void GetFirst(Iterator& a_it)
{
a_it.Init();
Node* first = m_root;
while(first)
{
if(first->IsInternalNode() && first->m_count > 1)
{
a_it.Push(first, 1); // Descend sibling branch later
}
else if(first->IsLeaf())
{
if(first->m_count)
{
a_it.Push(first, 0);
}
break;
}
first = first->m_branch[0].m_child;
}
}
/// Get Next for iteration
void GetNext(Iterator& a_it) { ++a_it; }
/// Is iterator NULL, or at end?
bool IsNull(Iterator& a_it) { return a_it.IsNull(); }
/// Get object at iterator position
DATATYPE& GetAt(Iterator& a_it) { return *a_it; }
protected:
/// Minimal bounding rectangle (n-dimensional)
struct Rect
{
ELEMTYPE m_min[NUMDIMS]; ///< Min dimensions of bounding box
ELEMTYPE m_max[NUMDIMS]; ///< Max dimensions of bounding box
};
/// May be data or may be another subtree
/// The parents level determines this.
/// If the parents level is 0, then this is data
struct Branch
{
Rect m_rect; ///< Bounds
Node* m_child; ///< Child node
DATATYPE m_data; ///< Data Id
};
/// Node for each branch level
struct Node
{
bool IsInternalNode() { return (m_level > 0); } // Not a leaf, but a internal node
bool IsLeaf() { return (m_level == 0); } // A leaf, contains data
int m_count; ///< Count
int m_level; ///< Leaf is zero, others positive
Branch m_branch[MAXNODES]; ///< Branch
};
/// A link list of nodes for reinsertion after a delete operation
struct ListNode
{
ListNode* m_next; ///< Next in list
Node* m_node; ///< Node
};
/// Variables for finding a split partition
struct PartitionVars
{
enum { NOT_TAKEN = -1 }; // indicates that position
int m_partition[MAXNODES+1];
int m_total;
int m_minFill;
int m_count[2];
Rect m_cover[2];
ELEMTYPEREAL m_area[2];
Branch m_branchBuf[MAXNODES+1];
int m_branchCount;
Rect m_coverSplit;
ELEMTYPEREAL m_coverSplitArea;
};
Node* AllocNode();
void FreeNode(Node* a_node);
void InitNode(Node* a_node);
void InitRect(Rect* a_rect);
bool InsertRectRec(const Branch& a_branch, Node* a_node, Node** a_newNode, int a_level);
bool InsertRect(const Branch& a_branch, Node** a_root, int a_level);
Rect NodeCover(Node* a_node);
bool AddBranch(const Branch* a_branch, Node* a_node, Node** a_newNode);
void DisconnectBranch(Node* a_node, int a_index);
int PickBranch(const Rect* a_rect, Node* a_node);
Rect CombineRect(const Rect* a_rectA, const Rect* a_rectB);
void SplitNode(Node* a_node, const Branch* a_branch, Node** a_newNode);
ELEMTYPEREAL RectSphericalVolume(Rect* a_rect);
ELEMTYPEREAL RectVolume(Rect* a_rect);
ELEMTYPEREAL CalcRectVolume(Rect* a_rect);
void GetBranches(Node* a_node, const Branch* a_branch, PartitionVars* a_parVars);
void ChoosePartition(PartitionVars* a_parVars, int a_minFill);
void LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars);
void InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill);
void PickSeeds(PartitionVars* a_parVars);
void Classify(int a_index, int a_group, PartitionVars* a_parVars);
bool RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root);
bool RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode);
ListNode* AllocListNode();
void FreeListNode(ListNode* a_listNode);
bool Overlap(Rect* a_rectA, Rect* a_rectB);
void ReInsert(Node* a_node, ListNode** a_listNode);
bool Search(Node* a_node, Rect* a_rect, int& a_foundCount, t_resultCallback a_resultCallback, void* a_context);
void RemoveAllRec(Node* a_node);
void Reset();
void CountRec(Node* a_node, int& a_count);
bool SaveRec(Node* a_node, RTFileStream& a_stream);
bool LoadRec(Node* a_node, RTFileStream& a_stream);
Node* m_root; ///< Root of tree
ELEMTYPEREAL m_unitSphereVolume; ///< Unit sphere constant for required number of dimensions
};
// Because there is not stream support, this is a quick and dirty file I/O helper.
// Users will likely replace its usage with a Stream implementation from their favorite API.
class RTFileStream
{
FILE* m_file;
public:
RTFileStream()
{
m_file = NULL;
}
~RTFileStream()
{
Close();
}
bool OpenRead(const char* a_fileName)
{
m_file = fopen(a_fileName, "rb");
if(!m_file)
{
return false;
}
return true;
}
bool OpenWrite(const char* a_fileName)
{
m_file = fopen(a_fileName, "wb");
if(!m_file)
{
return false;
}
return true;
}
void Close()
{
if(m_file)
{
fclose(m_file);
m_file = NULL;
}
}
template< typename TYPE >
size_t Write(const TYPE& a_value)
{
ASSERT(m_file);
return fwrite((void*)&a_value, sizeof(a_value), 1, m_file);
}
template< typename TYPE >
size_t WriteArray(const TYPE* a_array, int a_count)
{
ASSERT(m_file);
return fwrite((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
}
template< typename TYPE >
size_t Read(TYPE& a_value)
{
ASSERT(m_file);
return fread((void*)&a_value, sizeof(a_value), 1, m_file);
}
template< typename TYPE >
size_t ReadArray(TYPE* a_array, int a_count)
{
ASSERT(m_file);
return fread((void*)a_array, sizeof(TYPE) * a_count, 1, m_file);
}
};
RTREE_TEMPLATE
RTREE_QUAL::RTree()
{
ASSERT(MAXNODES > MINNODES);
ASSERT(MINNODES > 0);
// Precomputed volumes of the unit spheres for the first few dimensions
const float UNIT_SPHERE_VOLUMES[] = {
0.000000f, 2.000000f, 3.141593f, // Dimension 0,1,2
4.188790f, 4.934802f, 5.263789f, // Dimension 3,4,5
5.167713f, 4.724766f, 4.058712f, // Dimension 6,7,8
3.298509f, 2.550164f, 1.884104f, // Dimension 9,10,11
1.335263f, 0.910629f, 0.599265f, // Dimension 12,13,14
0.381443f, 0.235331f, 0.140981f, // Dimension 15,16,17
0.082146f, 0.046622f, 0.025807f, // Dimension 18,19,20
};
m_root = AllocNode();
m_root->m_level = 0;
m_unitSphereVolume = (ELEMTYPEREAL)UNIT_SPHERE_VOLUMES[NUMDIMS];
}
RTREE_TEMPLATE
RTREE_QUAL::~RTree()
{
Reset(); // Free, or reset node memory
}
RTREE_TEMPLATE
void RTREE_QUAL::Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
{
#ifdef _DEBUG
for(int index=0; index<NUMDIMS; ++index)
{
ASSERT(a_min[index] <= a_max[index]);
}
#endif //_DEBUG
Branch branch;
branch.m_data = a_dataId;
branch.m_child = NULL;
for(int axis=0; axis<NUMDIMS; ++axis)
{
branch.m_rect.m_min[axis] = a_min[axis];
branch.m_rect.m_max[axis] = a_max[axis];
}
InsertRect(branch, &m_root, 0);
}
RTREE_TEMPLATE
void RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId)
{
#ifdef _DEBUG
for(int index=0; index<NUMDIMS; ++index)
{
ASSERT(a_min[index] <= a_max[index]);
}
#endif //_DEBUG
Rect rect;
for(int axis=0; axis<NUMDIMS; ++axis)
{
rect.m_min[axis] = a_min[axis];
rect.m_max[axis] = a_max[axis];
}
RemoveRect(&rect, a_dataId, &m_root);
}
RTREE_TEMPLATE
int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], t_resultCallback a_resultCallback, void* a_context)
{
#ifdef _DEBUG
for(int index=0; index<NUMDIMS; ++index)
{
ASSERT(a_min[index] <= a_max[index]);
}
#endif //_DEBUG
Rect rect;
for(int axis=0; axis<NUMDIMS; ++axis)
{
rect.m_min[axis] = a_min[axis];
rect.m_max[axis] = a_max[axis];
}
// NOTE: May want to return search result another way, perhaps returning the number of found elements here.
int foundCount = 0;
Search(m_root, &rect, foundCount, a_resultCallback, a_context);
return foundCount;
}
RTREE_TEMPLATE
int RTREE_QUAL::Count()
{
int count = 0;
CountRec(m_root, count);
return count;
}
RTREE_TEMPLATE
void RTREE_QUAL::CountRec(Node* a_node, int& a_count)
{
if(a_node->IsInternalNode()) // not a leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
CountRec(a_node->m_branch[index].m_child, a_count);
}
}
else // A leaf node
{
a_count += a_node->m_count;
}
}
RTREE_TEMPLATE
bool RTREE_QUAL::Load(const char* a_fileName)
{
RemoveAll(); // Clear existing tree
RTFileStream stream;
if(!stream.OpenRead(a_fileName))
{
return false;
}
bool result = Load(stream);
stream.Close();
return result;
}
RTREE_TEMPLATE
bool RTREE_QUAL::Load(RTFileStream& a_stream)
{
// Write some kind of header
int _dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
int _dataSize = sizeof(DATATYPE);
int _dataNumDims = NUMDIMS;
int _dataElemSize = sizeof(ELEMTYPE);
int _dataElemRealSize = sizeof(ELEMTYPEREAL);
int _dataMaxNodes = TMAXNODES;
int _dataMinNodes = TMINNODES;
int dataFileId = 0;
int dataSize = 0;
int dataNumDims = 0;
int dataElemSize = 0;
int dataElemRealSize = 0;
int dataMaxNodes = 0;
int dataMinNodes = 0;
a_stream.Read(dataFileId);
a_stream.Read(dataSize);
a_stream.Read(dataNumDims);
a_stream.Read(dataElemSize);
a_stream.Read(dataElemRealSize);
a_stream.Read(dataMaxNodes);
a_stream.Read(dataMinNodes);
bool result = false;
// Test if header was valid and compatible
if( (dataFileId == _dataFileId)
&& (dataSize == _dataSize)
&& (dataNumDims == _dataNumDims)
&& (dataElemSize == _dataElemSize)
&& (dataElemRealSize == _dataElemRealSize)
&& (dataMaxNodes == _dataMaxNodes)
&& (dataMinNodes == _dataMinNodes)
)
{
// Recursively load tree
result = LoadRec(m_root, a_stream);
}
return result;
}
RTREE_TEMPLATE
bool RTREE_QUAL::LoadRec(Node* a_node, RTFileStream& a_stream)
{
a_stream.Read(a_node->m_level);
a_stream.Read(a_node->m_count);
if(a_node->IsInternalNode()) // not a leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
Branch* curBranch = &a_node->m_branch[index];
a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
curBranch->m_child = AllocNode();
LoadRec(curBranch->m_child, a_stream);
}
}
else // A leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
Branch* curBranch = &a_node->m_branch[index];
a_stream.ReadArray(curBranch->m_rect.m_min, NUMDIMS);
a_stream.ReadArray(curBranch->m_rect.m_max, NUMDIMS);
a_stream.Read(curBranch->m_data);
}
}
return true; // Should do more error checking on I/O operations
}
RTREE_TEMPLATE
bool RTREE_QUAL::Save(const char* a_fileName)
{
RTFileStream stream;
if(!stream.OpenWrite(a_fileName))
{
return false;
}
bool result = Save(stream);
stream.Close();
return result;
}
RTREE_TEMPLATE
bool RTREE_QUAL::Save(RTFileStream& a_stream)
{
// Write some kind of header
int dataFileId = ('R'<<0)|('T'<<8)|('R'<<16)|('E'<<24);
int dataSize = sizeof(DATATYPE);
int dataNumDims = NUMDIMS;
int dataElemSize = sizeof(ELEMTYPE);
int dataElemRealSize = sizeof(ELEMTYPEREAL);
int dataMaxNodes = TMAXNODES;
int dataMinNodes = TMINNODES;
a_stream.Write(dataFileId);
a_stream.Write(dataSize);
a_stream.Write(dataNumDims);
a_stream.Write(dataElemSize);
a_stream.Write(dataElemRealSize);
a_stream.Write(dataMaxNodes);
a_stream.Write(dataMinNodes);
// Recursively save tree
bool result = SaveRec(m_root, a_stream);
return result;
}
RTREE_TEMPLATE
bool RTREE_QUAL::SaveRec(Node* a_node, RTFileStream& a_stream)
{
a_stream.Write(a_node->m_level);
a_stream.Write(a_node->m_count);
if(a_node->IsInternalNode()) // not a leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
Branch* curBranch = &a_node->m_branch[index];
a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
SaveRec(curBranch->m_child, a_stream);
}
}
else // A leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
Branch* curBranch = &a_node->m_branch[index];
a_stream.WriteArray(curBranch->m_rect.m_min, NUMDIMS);
a_stream.WriteArray(curBranch->m_rect.m_max, NUMDIMS);
a_stream.Write(curBranch->m_data);
}
}
return true; // Should do more error checking on I/O operations
}
RTREE_TEMPLATE
void RTREE_QUAL::RemoveAll()
{
// Delete all existing nodes
Reset();
m_root = AllocNode();
m_root->m_level = 0;
}
RTREE_TEMPLATE
void RTREE_QUAL::Reset()
{
#ifdef RTREE_DONT_USE_MEMPOOLS
// Delete all existing nodes
RemoveAllRec(m_root);
#else // RTREE_DONT_USE_MEMPOOLS
// Just reset memory pools. We are not using complex types
// EXAMPLE
#endif // RTREE_DONT_USE_MEMPOOLS
}
RTREE_TEMPLATE
void RTREE_QUAL::RemoveAllRec(Node* a_node)
{
ASSERT(a_node);
ASSERT(a_node->m_level >= 0);
if(a_node->IsInternalNode()) // This is an internal node in the tree
{
for(int index=0; index < a_node->m_count; ++index)
{
RemoveAllRec(a_node->m_branch[index].m_child);
}
}
FreeNode(a_node);
}
RTREE_TEMPLATE
typename RTREE_QUAL::Node* RTREE_QUAL::AllocNode()
{
Node* newNode;
#ifdef RTREE_DONT_USE_MEMPOOLS
newNode = new Node;
#else // RTREE_DONT_USE_MEMPOOLS
// EXAMPLE
#endif // RTREE_DONT_USE_MEMPOOLS
InitNode(newNode);
return newNode;
}
RTREE_TEMPLATE
void RTREE_QUAL::FreeNode(Node* a_node)
{
ASSERT(a_node);
#ifdef RTREE_DONT_USE_MEMPOOLS
delete a_node;
#else // RTREE_DONT_USE_MEMPOOLS
// EXAMPLE
#endif // RTREE_DONT_USE_MEMPOOLS
}
// Allocate space for a node in the list used in DeletRect to
// store Nodes that are too empty.
RTREE_TEMPLATE
typename RTREE_QUAL::ListNode* RTREE_QUAL::AllocListNode()
{
#ifdef RTREE_DONT_USE_MEMPOOLS
return new ListNode;
#else // RTREE_DONT_USE_MEMPOOLS
// EXAMPLE
#endif // RTREE_DONT_USE_MEMPOOLS
}
RTREE_TEMPLATE
void RTREE_QUAL::FreeListNode(ListNode* a_listNode)
{
#ifdef RTREE_DONT_USE_MEMPOOLS
delete a_listNode;
#else // RTREE_DONT_USE_MEMPOOLS
// EXAMPLE
#endif // RTREE_DONT_USE_MEMPOOLS
}
RTREE_TEMPLATE
void RTREE_QUAL::InitNode(Node* a_node)
{
a_node->m_count = 0;
a_node->m_level = -1;
}
RTREE_TEMPLATE
void RTREE_QUAL::InitRect(Rect* a_rect)
{
for(int index = 0; index < NUMDIMS; ++index)
{
a_rect->m_min[index] = (ELEMTYPE)0;
a_rect->m_max[index] = (ELEMTYPE)0;
}
}
// Inserts a new data rectangle into the index structure.
// Recursively descends tree, propagates splits back up.
// Returns 0 if node was not split. Old node updated.
// If node was split, returns 1 and sets the pointer pointed to by
// new_node to point to the new node. Old node updated to become one of two.
// The level argument specifies the number of steps up from the leaf
// level to insert; e.g. a data rectangle goes in at level = 0.
RTREE_TEMPLATE
bool RTREE_QUAL::InsertRectRec(const Branch& a_branch, Node* a_node, Node** a_newNode, int a_level)
{
ASSERT(a_node && a_newNode);
ASSERT(a_level >= 0 && a_level <= a_node->m_level);
// recurse until we reach the correct level for the new record. data records
// will always be called with a_level == 0 (leaf)
if(a_node->m_level > a_level)
{
// Still above level for insertion, go down tree recursively
Node* otherNode;
// find the optimal branch for this record
int index = PickBranch(&a_branch.m_rect, a_node);
// recursively insert this record into the picked branch
bool childWasSplit = InsertRectRec(a_branch, a_node->m_branch[index].m_child, &otherNode, a_level);
if (!childWasSplit)
{
// Child was not split. Merge the bounding box of the new record with the
// existing bounding box
a_node->m_branch[index].m_rect = CombineRect(&a_branch.m_rect, &(a_node->m_branch[index].m_rect));
return false;
}
else
{
// Child was split. The old branches are now re-partitioned to two nodes
// so we have to re-calculate the bounding boxes of each node
a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
Branch branch;
branch.m_child = otherNode;
branch.m_rect = NodeCover(otherNode);
// The old node is already a child of a_node. Now add the newly-created
// node to a_node as well. a_node might be split because of that.
return AddBranch(&branch, a_node, a_newNode);
}
}
else if(a_node->m_level == a_level)
{
// We have reached level for insertion. Add rect, split if necessary
return AddBranch(&a_branch, a_node, a_newNode);
}
else
{
// Should never occur
ASSERT(0);
return false;
}
}
// Insert a data rectangle into an index structure.
// InsertRect provides for splitting the root;
// returns 1 if root was split, 0 if it was not.
// The level argument specifies the number of steps up from the leaf
// level to insert; e.g. a data rectangle goes in at level = 0.
// InsertRect2 does the recursion.
//
RTREE_TEMPLATE
bool RTREE_QUAL::InsertRect(const Branch& a_branch, Node** a_root, int a_level)
{
ASSERT(a_root);
ASSERT(a_level >= 0 && a_level <= (*a_root)->m_level);
#ifdef _DEBUG
for(int index=0; index < NUMDIMS; ++index)
{
ASSERT(a_branch.m_rect.m_min[index] <= a_branch.m_rect.m_max[index]);
}
#endif //_DEBUG
Node* newNode;
if(InsertRectRec(a_branch, *a_root, &newNode, a_level)) // Root split
{
// Grow tree taller and new root
Node* newRoot = AllocNode();
newRoot->m_level = (*a_root)->m_level + 1;
Branch branch;
// add old root node as a child of the new root
branch.m_rect = NodeCover(*a_root);
branch.m_child = *a_root;
AddBranch(&branch, newRoot, NULL);
// add the split node as a child of the new root
branch.m_rect = NodeCover(newNode);
branch.m_child = newNode;
AddBranch(&branch, newRoot, NULL);
// set the new root as the root node
*a_root = newRoot;
return true;
}
return false;
}
// Find the smallest rectangle that includes all rectangles in branches of a node.
RTREE_TEMPLATE
typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover(Node* a_node)
{
ASSERT(a_node);
Rect rect = a_node->m_branch[0].m_rect;
for(int index = 1; index < a_node->m_count; ++index)
{
rect = CombineRect(&rect, &(a_node->m_branch[index].m_rect));
}
return rect;
}
// Add a branch to a node. Split the node if necessary.
// Returns 0 if node not split. Old node updated.
// Returns 1 if node split, sets *new_node to address of new node.
// Old node updated, becomes one of two.
RTREE_TEMPLATE
bool RTREE_QUAL::AddBranch(const Branch* a_branch, Node* a_node, Node** a_newNode)
{
ASSERT(a_branch);
ASSERT(a_node);
if(a_node->m_count < MAXNODES) // Split won't be necessary
{
a_node->m_branch[a_node->m_count] = *a_branch;
++a_node->m_count;
return false;
}
else
{
ASSERT(a_newNode);
SplitNode(a_node, a_branch, a_newNode);
return true;
}
}
// Disconnect a dependent node.
// Caller must return (or stop using iteration index) after this as count has changed
RTREE_TEMPLATE
void RTREE_QUAL::DisconnectBranch(Node* a_node, int a_index)
{
ASSERT(a_node && (a_index >= 0) && (a_index < MAXNODES));
ASSERT(a_node->m_count > 0);
// Remove element by swapping with the last element to prevent gaps in array
a_node->m_branch[a_index] = a_node->m_branch[a_node->m_count - 1];
--a_node->m_count;
}
// Pick a branch. Pick the one that will need the smallest increase
// in area to accomodate the new rectangle. This will result in the
// least total area for the covering rectangles in the current node.
// In case of a tie, pick the one which was smaller before, to get
// the best resolution when searching.
RTREE_TEMPLATE
int RTREE_QUAL::PickBranch(const Rect* a_rect, Node* a_node)
{
ASSERT(a_rect && a_node);
bool firstTime = true;
ELEMTYPEREAL increase;
ELEMTYPEREAL bestIncr = (ELEMTYPEREAL)-1;
ELEMTYPEREAL area;
ELEMTYPEREAL bestArea;
int best;
Rect tempRect;
for(int index=0; index < a_node->m_count; ++index)
{
Rect* curRect = &a_node->m_branch[index].m_rect;
area = CalcRectVolume(curRect);
tempRect = CombineRect(a_rect, curRect);
increase = CalcRectVolume(&tempRect) - area;
if((increase < bestIncr) || firstTime)
{
best = index;
bestArea = area;
bestIncr = increase;
firstTime = false;
}
else if((increase == bestIncr) && (area < bestArea))
{
best = index;
bestArea = area;
bestIncr = increase;
}
}
return best;
}
// Combine two rectangles into larger one containing both
RTREE_TEMPLATE
typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect(const Rect* a_rectA, const Rect* a_rectB)
{
ASSERT(a_rectA && a_rectB);
Rect newRect;
for(int index = 0; index < NUMDIMS; ++index)
{
newRect.m_min[index] = std::min(a_rectA->m_min[index], a_rectB->m_min[index]);
newRect.m_max[index] = std::max(a_rectA->m_max[index], a_rectB->m_max[index]);
}
return newRect;
}
// Split a node.
// Divides the nodes branches and the extra one between two nodes.
// Old node is one of the new ones, and one really new one is created.
// Tries more than one method for choosing a partition, uses best result.
RTREE_TEMPLATE
void RTREE_QUAL::SplitNode(Node* a_node, const Branch* a_branch, Node** a_newNode)
{
ASSERT(a_node);
ASSERT(a_branch);
// Could just use local here, but member or external is faster since it is reused
PartitionVars localVars;
PartitionVars* parVars = &localVars;
// Load all the branches into a buffer, initialize old node
GetBranches(a_node, a_branch, parVars);
// Find partition
ChoosePartition(parVars, MINNODES);
// Create a new node to hold (about) half of the branches
*a_newNode = AllocNode();
(*a_newNode)->m_level = a_node->m_level;
// Put branches from buffer into 2 nodes according to the chosen partition
a_node->m_count = 0;
LoadNodes(a_node, *a_newNode, parVars);
ASSERT((a_node->m_count + (*a_newNode)->m_count) == parVars->m_total);
}
// Calculate the n-dimensional volume of a rectangle
RTREE_TEMPLATE
ELEMTYPEREAL RTREE_QUAL::RectVolume(Rect* a_rect)
{
ASSERT(a_rect);
ELEMTYPEREAL volume = (ELEMTYPEREAL)1;
for(int index=0; index<NUMDIMS; ++index)
{
volume *= a_rect->m_max[index] - a_rect->m_min[index];
}
ASSERT(volume >= (ELEMTYPEREAL)0);
return volume;
}
// The exact volume of the bounding sphere for the given Rect
RTREE_TEMPLATE
ELEMTYPEREAL RTREE_QUAL::RectSphericalVolume(Rect* a_rect)
{
ASSERT(a_rect);
ELEMTYPEREAL sumOfSquares = (ELEMTYPEREAL)0;
ELEMTYPEREAL radius;
for(int index=0; index < NUMDIMS; ++index)
{
ELEMTYPEREAL halfExtent = ((ELEMTYPEREAL)a_rect->m_max[index] - (ELEMTYPEREAL)a_rect->m_min[index]) * 0.5f;
sumOfSquares += halfExtent * halfExtent;
}
radius = (ELEMTYPEREAL)sqrt(sumOfSquares);
// Pow maybe slow, so test for common dims like 2,3 and just use x*x, x*x*x.
if(NUMDIMS == 3)
{
return (radius * radius * radius * m_unitSphereVolume);
}
else if(NUMDIMS == 2)
{
return (radius * radius * m_unitSphereVolume);
}
else
{
return (ELEMTYPEREAL)(pow(radius, NUMDIMS) * m_unitSphereVolume);
}
}
// Use one of the methods to calculate retangle volume
RTREE_TEMPLATE
ELEMTYPEREAL RTREE_QUAL::CalcRectVolume(Rect* a_rect)
{
#ifdef RTREE_USE_SPHERICAL_VOLUME
return RectSphericalVolume(a_rect); // Slower but helps certain merge cases
#else // RTREE_USE_SPHERICAL_VOLUME
return RectVolume(a_rect); // Faster but can cause poor merges
#endif // RTREE_USE_SPHERICAL_VOLUME
}
// Load branch buffer with branches from full node plus the extra branch.
RTREE_TEMPLATE
void RTREE_QUAL::GetBranches(Node* a_node, const Branch* a_branch, PartitionVars* a_parVars)
{
ASSERT(a_node);
ASSERT(a_branch);
ASSERT(a_node->m_count == MAXNODES);
// Load the branch buffer
for(int index=0; index < MAXNODES; ++index)
{
a_parVars->m_branchBuf[index] = a_node->m_branch[index];
}
a_parVars->m_branchBuf[MAXNODES] = *a_branch;
a_parVars->m_branchCount = MAXNODES + 1;
// Calculate rect containing all in the set
a_parVars->m_coverSplit = a_parVars->m_branchBuf[0].m_rect;
for(int index=1; index < MAXNODES+1; ++index)
{
a_parVars->m_coverSplit = CombineRect(&a_parVars->m_coverSplit, &a_parVars->m_branchBuf[index].m_rect);
}
a_parVars->m_coverSplitArea = CalcRectVolume(&a_parVars->m_coverSplit);
}
// Method #0 for choosing a partition:
// As the seeds for the two groups, pick the two rects that would waste the
// most area if covered by a single rectangle, i.e. evidently the worst pair
// to have in the same group.
// Of the remaining, one at a time is chosen to be put in one of the two groups.
// The one chosen is the one with the greatest difference in area expansion
// depending on which group - the rect most strongly attracted to one group
// and repelled from the other.
// If one group gets too full (more would force other group to violate min
// fill requirement) then other group gets the rest.
// These last are the ones that can go in either group most easily.
RTREE_TEMPLATE
void RTREE_QUAL::ChoosePartition(PartitionVars* a_parVars, int a_minFill)
{
ASSERT(a_parVars);
ELEMTYPEREAL biggestDiff;
int group, chosen, betterGroup;
InitParVars(a_parVars, a_parVars->m_branchCount, a_minFill);
PickSeeds(a_parVars);
while (((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
&& (a_parVars->m_count[0] < (a_parVars->m_total - a_parVars->m_minFill))
&& (a_parVars->m_count[1] < (a_parVars->m_total - a_parVars->m_minFill)))
{
biggestDiff = (ELEMTYPEREAL) -1;
for(int index=0; index<a_parVars->m_total; ++index)
{
if(PartitionVars::NOT_TAKEN == a_parVars->m_partition[index])
{
Rect* curRect = &a_parVars->m_branchBuf[index].m_rect;
Rect rect0 = CombineRect(curRect, &a_parVars->m_cover[0]);
Rect rect1 = CombineRect(curRect, &a_parVars->m_cover[1]);
ELEMTYPEREAL growth0 = CalcRectVolume(&rect0) - a_parVars->m_area[0];
ELEMTYPEREAL growth1 = CalcRectVolume(&rect1) - a_parVars->m_area[1];
ELEMTYPEREAL diff = growth1 - growth0;
if(diff >= 0)
{
group = 0;
}
else
{
group = 1;
diff = -diff;
}
if(diff > biggestDiff)
{
biggestDiff = diff;
chosen = index;
betterGroup = group;
}
else if((diff == biggestDiff) && (a_parVars->m_count[group] < a_parVars->m_count[betterGroup]))
{
chosen = index;
betterGroup = group;
}
}
}
Classify(chosen, betterGroup, a_parVars);
}
// If one group too full, put remaining rects in the other
if((a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total)
{
if(a_parVars->m_count[0] >= a_parVars->m_total - a_parVars->m_minFill)
{
group = 1;
}
else
{
group = 0;
}
for(int index=0; index<a_parVars->m_total; ++index)
{
if(PartitionVars::NOT_TAKEN == a_parVars->m_partition[index])
{
Classify(index, group, a_parVars);
}
}
}
ASSERT((a_parVars->m_count[0] + a_parVars->m_count[1]) == a_parVars->m_total);
ASSERT((a_parVars->m_count[0] >= a_parVars->m_minFill) &&
(a_parVars->m_count[1] >= a_parVars->m_minFill));
}
// Copy branches from the buffer into two nodes according to the partition.
RTREE_TEMPLATE
void RTREE_QUAL::LoadNodes(Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars)
{
ASSERT(a_nodeA);
ASSERT(a_nodeB);
ASSERT(a_parVars);
for(int index=0; index < a_parVars->m_total; ++index)
{
ASSERT(a_parVars->m_partition[index] == 0 || a_parVars->m_partition[index] == 1);
int targetNodeIndex = a_parVars->m_partition[index];
Node* targetNodes[] = {a_nodeA, a_nodeB};
// It is assured that AddBranch here will not cause a node split.
bool nodeWasSplit = AddBranch(&a_parVars->m_branchBuf[index], targetNodes[targetNodeIndex], NULL);
ASSERT(!nodeWasSplit);
}
}
// Initialize a PartitionVars structure.
RTREE_TEMPLATE
void RTREE_QUAL::InitParVars(PartitionVars* a_parVars, int a_maxRects, int a_minFill)
{
ASSERT(a_parVars);
a_parVars->m_count[0] = a_parVars->m_count[1] = 0;
a_parVars->m_area[0] = a_parVars->m_area[1] = (ELEMTYPEREAL)0;
a_parVars->m_total = a_maxRects;
a_parVars->m_minFill = a_minFill;
for(int index=0; index < a_maxRects; ++index)
{
a_parVars->m_partition[index] = PartitionVars::NOT_TAKEN;
}
}
RTREE_TEMPLATE
void RTREE_QUAL::PickSeeds(PartitionVars* a_parVars)
{
int seed0, seed1;
ELEMTYPEREAL worst, waste;
ELEMTYPEREAL area[MAXNODES+1];
for(int index=0; index<a_parVars->m_total; ++index)
{
area[index] = CalcRectVolume(&a_parVars->m_branchBuf[index].m_rect);
}
worst = -a_parVars->m_coverSplitArea - 1;
for(int indexA=0; indexA < a_parVars->m_total-1; ++indexA)
{
for(int indexB = indexA+1; indexB < a_parVars->m_total; ++indexB)
{
Rect oneRect = CombineRect(&a_parVars->m_branchBuf[indexA].m_rect, &a_parVars->m_branchBuf[indexB].m_rect);
waste = CalcRectVolume(&oneRect) - area[indexA] - area[indexB];
if(waste > worst)
{
worst = waste;
seed0 = indexA;
seed1 = indexB;
}
}
}
Classify(seed0, 0, a_parVars);
Classify(seed1, 1, a_parVars);
}
// Put a branch in one of the groups.
RTREE_TEMPLATE
void RTREE_QUAL::Classify(int a_index, int a_group, PartitionVars* a_parVars)
{
ASSERT(a_parVars);
ASSERT(PartitionVars::NOT_TAKEN == a_parVars->m_partition[a_index]);
a_parVars->m_partition[a_index] = a_group;
// Calculate combined rect
if (a_parVars->m_count[a_group] == 0)
{
a_parVars->m_cover[a_group] = a_parVars->m_branchBuf[a_index].m_rect;
}
else
{
a_parVars->m_cover[a_group] = CombineRect(&a_parVars->m_branchBuf[a_index].m_rect, &a_parVars->m_cover[a_group]);
}
// Calculate volume of combined rect
a_parVars->m_area[a_group] = CalcRectVolume(&a_parVars->m_cover[a_group]);
++a_parVars->m_count[a_group];
}
// Delete a data rectangle from an index structure.
// Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node.
// Returns 1 if record not found, 0 if success.
// RemoveRect provides for eliminating the root.
RTREE_TEMPLATE
bool RTREE_QUAL::RemoveRect(Rect* a_rect, const DATATYPE& a_id, Node** a_root)
{
ASSERT(a_rect && a_root);
ASSERT(*a_root);
ListNode* reInsertList = NULL;
if(!RemoveRectRec(a_rect, a_id, *a_root, &reInsertList))
{
// Found and deleted a data item
// Reinsert any branches from eliminated nodes
while(reInsertList)
{
Node* tempNode = reInsertList->m_node;
for(int index = 0; index < tempNode->m_count; ++index)
{
// TODO go over this code. should I use (tempNode->m_level - 1)?
InsertRect(tempNode->m_branch[index],
a_root,
tempNode->m_level);
}
ListNode* remLNode = reInsertList;
reInsertList = reInsertList->m_next;
FreeNode(remLNode->m_node);
FreeListNode(remLNode);
}
// Check for redundant root (not leaf, 1 child) and eliminate TODO replace
// if with while? In case there is a whole branch of redundant roots...
if((*a_root)->m_count == 1 && (*a_root)->IsInternalNode())
{
Node* tempNode = (*a_root)->m_branch[0].m_child;
ASSERT(tempNode);
FreeNode(*a_root);
*a_root = tempNode;
}
return false;
}
else
{
return true;
}
}
// Delete a rectangle from non-root part of an index structure.
// Called by RemoveRect. Descends tree recursively,
// merges branches on the way back up.
// Returns 1 if record not found, 0 if success.
RTREE_TEMPLATE
bool RTREE_QUAL::RemoveRectRec(Rect* a_rect, const DATATYPE& a_id, Node* a_node, ListNode** a_listNode)
{
ASSERT(a_rect && a_node && a_listNode);
ASSERT(a_node->m_level >= 0);
if(a_node->IsInternalNode()) // not a leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
if(Overlap(a_rect, &(a_node->m_branch[index].m_rect)))
{
if(!RemoveRectRec(a_rect, a_id, a_node->m_branch[index].m_child, a_listNode))
{
if(a_node->m_branch[index].m_child->m_count >= MINNODES)
{
// child removed, just resize parent rect
a_node->m_branch[index].m_rect = NodeCover(a_node->m_branch[index].m_child);
}
else
{
// child removed, not enough entries in node, eliminate node
ReInsert(a_node->m_branch[index].m_child, a_listNode);
DisconnectBranch(a_node, index); // Must return after this call as count has changed
}
return false;
}
}
}
return true;
}
else // A leaf node
{
for(int index = 0; index < a_node->m_count; ++index)
{
if(a_node->m_branch[index].m_data == a_id)
{
DisconnectBranch(a_node, index); // Must return after this call as count has changed
return false;
}
}
return true;
}
}
// Decide whether two rectangles overlap.
RTREE_TEMPLATE
bool RTREE_QUAL::Overlap(Rect* a_rectA, Rect* a_rectB)
{
ASSERT(a_rectA && a_rectB);
for(int index=0; index < NUMDIMS; ++index)
{
if (a_rectA->m_min[index] > a_rectB->m_max[index] ||
a_rectB->m_min[index] > a_rectA->m_max[index])
{
return false;
}
}
return true;
}
// Add a node to the reinsertion list. All its branches will later
// be reinserted into the index structure.
RTREE_TEMPLATE
void RTREE_QUAL::ReInsert(Node* a_node, ListNode** a_listNode)
{
ListNode* newListNode;
newListNode = AllocListNode();
newListNode->m_node = a_node;
newListNode->m_next = *a_listNode;
*a_listNode = newListNode;
}
// Search in an index tree or subtree for all data retangles that overlap the argument rectangle.
RTREE_TEMPLATE
bool RTREE_QUAL::Search(Node* a_node, Rect* a_rect, int& a_foundCount, t_resultCallback a_resultCallback, void* a_context)
{
ASSERT(a_node);
ASSERT(a_node->m_level >= 0);
ASSERT(a_rect);
if(a_node->IsInternalNode())
{
// This is an internal node in the tree
for(int index=0; index < a_node->m_count; ++index)
{
if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
{
if(!Search(a_node->m_branch[index].m_child, a_rect, a_foundCount, a_resultCallback, a_context))
{
// The callback indicated to stop searching
return false;
}
}
}
}
else
{
// This is a leaf node
for(int index=0; index < a_node->m_count; ++index)
{
if(Overlap(a_rect, &a_node->m_branch[index].m_rect))
{
DATATYPE& id = a_node->m_branch[index].m_data;
++a_foundCount;
// NOTE: There are different ways to return results. Here's where to modify
if(a_resultCallback)
{
if(!a_resultCallback(id, a_context))
{
return false; // Don't continue searching
}
}
}
}
}
return true; // Continue searching
}
#undef RTREE_TEMPLATE
#undef RTREE_QUAL
#endif //RTREE_H
| 44,357 | 26.671865 | 136 | h |
la3dm | la3dm-master/include/gpoctomap/gpblock.h | #ifndef LA3DM_GP_BLOCK_H
#define LA3DM_GP_BLOCK_H
#include <unordered_map>
#include <array>
#include "point3f.h"
#include "gpoctree_node.h"
#include "gpoctree.h"
namespace la3dm {
/// Hask key to index Block given block's center.
typedef int64_t BlockHashKey;
/// Initialize Look-Up Table
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth);
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map,
unsigned short max_depth);
/// Extended Block
#ifdef PREDICT
typedef std::array<BlockHashKey, 27> ExtendedBlock;
#else
typedef std::array<BlockHashKey, 7> ExtendedBlock;
#endif
/// Convert from block to hash key.
BlockHashKey block_to_hash_key(point3f center);
/// Convert from block to hash key.
BlockHashKey block_to_hash_key(float x, float y, float z);
/// Convert from hash key to block.
point3f hash_key_to_block(BlockHashKey key);
/// Get current block's extended block.
ExtendedBlock get_extended_block(BlockHashKey key);
/*
* @brief Block is built on top of OcTree, providing the functions to locate nodes.
*
* Block stores the information needed to locate each OcTreeNode's position:
* fixed resolution, fixed block_size, both of which must be initialized.
* The localization is implemented using Loop-Up Table.
*/
class Block : public OcTree {
friend BlockHashKey block_to_hash_key(point3f center);
friend BlockHashKey block_to_hash_key(float x, float y, float z);
friend point3f hash_key_to_block(BlockHashKey key);
friend ExtendedBlock get_extended_block(BlockHashKey key);
friend class GPOctoMap;
public:
Block();
Block(point3f center);
/// @return location of the OcTreeNode given OcTree's LeafIterator.
inline point3f get_loc(const LeafIterator &it) const {
return Block::key_loc_map[it.get_hash_key()] + center;
}
/// @return size of the OcTreeNode given OcTree's LeafIterator.
inline float get_size(const LeafIterator &it) const {
unsigned short depth, index;
hash_key_to_node(it.get_hash_key(), depth, index);
return float(size / pow(2, depth));
}
/// @return center of current Block.
inline point3f get_center() const { return center; }
/// @return min lim of current Block.
inline point3f get_lim_min() const { return center - point3f(size / 2.0f, size / 2.0f, size / 2.0f); }
/// @return max lim of current Block.
inline point3f get_lim_max() const { return center + point3f(size / 2.0f, size / 2.0f, size / 2.0f); }
/// @return ExtendedBlock of current Block.
ExtendedBlock get_extended_block() const;
OcTreeHashKey get_node(unsigned short x, unsigned short y, unsigned short z) const;
point3f get_point(unsigned short x, unsigned short y, unsigned short z) const;
void get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const;
OcTreeNode &search(float x, float y, float z) const;
OcTreeNode &search(point3f p) const;
private:
// Loop-Up Table
static std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
static std::unordered_map<unsigned short, OcTreeHashKey> index_map;
static float resolution;
static float size;
static unsigned short cell_num;
point3f center;
};
}
#endif // LA3DM_GP_BLOCK_H
| 3,704 | 32.378378 | 131 | h |
la3dm | la3dm-master/include/gpoctomap/gpoctomap.h | #ifndef LA3DM_GP_OCTOMAP_H
#define LA3DM_GP_OCTOMAP_H
#include <unordered_map>
#include <vector>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include "rtree.h"
#include "gpblock.h"
#include "gpoctree_node.h"
namespace la3dm {
/// PCL PointCloud types as input
typedef pcl::PointXYZ PCLPointType;
typedef pcl::PointCloud<PCLPointType> PCLPointCloud;
/*
* @brief GPOctoMap
*
* Fast, Accurate Gaussian Process Occupancy Maps via Test-Data Octrees
* and Nested Bayesian Fusion. The space is partitioned by Blocks
* in which OcTrees with fixed depth are rooted. The training part of GP
* is performed Block by Block with training data inside each Block.
* Occupancy values in one Block is predicted by its ExtendedBlock via BCM.
*/
class GPOctoMap {
public:
/// Types used internally
typedef std::vector<point3f> PointCloud;
typedef std::pair<point3f, float> GPPointType;
typedef std::vector<GPPointType> GPPointCloud;
typedef RTree<GPPointType *, float, 3, float> MyRTree;
public:
GPOctoMap();
/*
* @param resolution (default 0.1m)
* @param block_depth maximum depth of OcTree (default 4)
* @param sf2 signal variance in GPs (default 1.0)
* @param ell length-scale in GPs (default 1.0)
* @param noise noise variance in GPs (default 0.01)
* @param l length-scale in logistic regression function (default 100)
* @param min_var minimum variance in Occupancy (default 0.001)
* @param max_var maximum variance in Occupancy (default 1000)
* @param max_known_var maximum variance for Occuapncy to be classified as KNOWN State (default 0.02)
* @param free_thresh free threshold for Occupancy probability (default 0.3)
* @param occupied_thresh occupied threshold for Occupancy probability (default 0.7)
*/
GPOctoMap(float resolution, unsigned short block_depth, float sf2, float ell, float noise, float l,
float min_var,
float max_var, float max_known_var, float free_thresh, float occupied_thresh);
~GPOctoMap();
/// Set resolution.
void set_resolution(float resolution);
/// Set block max depth.
void set_block_depth(unsigned short max_depth);
/// Get resolution.
inline float get_resolution() const { return resolution; }
/// Get block max depth.
inline float get_block_depth() const { return block_depth; }
/*
* @brief Insert PCL PointCloud into GPOctoMaps.
* @param cloud one scan in PCLPointCloud format
* @param origin sensor origin in the scan
* @param ds_resolution downsampling resolution for PCL VoxelGrid filtering (-1 if no downsampling)
* @param free_res resolution for sampling free training points along sensor beams (default 2.0)
* @param max_range maximum range for beams to be considered as valid measurements (-1 if no limitation)
*/
void insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res = 2.0f,
float max_range = -1);
void insert_training_data(const GPPointCloud &cloud);
/// Get bounding box of the map.
void get_bbox(point3f &lim_min, point3f &lim_max) const;
class RayCaster {
public:
RayCaster(const GPOctoMap *map, const point3f &start, const point3f &end) : map(map) {
assert(map != nullptr);
_block_key = block_to_hash_key(start);
block = map->search(_block_key);
lim = static_cast<unsigned short>(pow(2, map->block_depth - 1));
if (block != nullptr) {
block->get_index(start, x, y, z);
block_lim = block->get_center();
block_size = block->size;
current_p = start;
resolution = map->resolution;
int x0 = static_cast<int>((start.x() / resolution));
int y0 = static_cast<int>((start.y() / resolution));
int z0 = static_cast<int>((start.z() / resolution));
int x1 = static_cast<int>((end.x() / resolution));
int y1 = static_cast<int>((end.y() / resolution));
int z1 = static_cast<int>((end.z() / resolution));
dx = abs(x1 - x0);
dy = abs(y1 - y0);
dz = abs(z1 - z0);
n = 1 + dx + dy + dz;
x_inc = x1 > x0 ? 1 : (x1 == x0 ? 0 : -1);
y_inc = y1 > y0 ? 1 : (y1 == y0 ? 0 : -1);
z_inc = z1 > z0 ? 1 : (z1 == z0 ? 0 : -1);
xy_error = dx - dy;
xz_error = dx - dz;
yz_error = dy - dz;
dx *= 2;
dy *= 2;
dz *= 2;
} else {
n = 0;
}
}
inline bool end() const { return n <= 0; }
bool next(point3f &p, OcTreeNode &node, BlockHashKey &block_key, OcTreeHashKey &node_key) {
assert(!end());
bool valid = false;
unsigned short index = x + y * lim + z * lim * lim;
node_key = Block::index_map[index];
block_key = _block_key;
if (block != nullptr) {
valid = true;
node = (*block)[node_key];
current_p = block->get_point(x, y, z);
p = current_p;
} else {
p = current_p;
}
if (xy_error > 0 && xz_error > 0) {
x += x_inc;
current_p.x() += x_inc * resolution;
xy_error -= dy;
xz_error -= dz;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error < 0 && yz_error > 0) {
y += y_inc;
current_p.y() += y_inc * resolution;
xy_error += dx;
yz_error -= dz;
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
} else if (yz_error < 0 && xz_error < 0) {
z += z_inc;
current_p.z() += z_inc * resolution;
xz_error += dx;
yz_error += dy;
if (z >= lim || z < 0) {
block_lim.z() += z_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
z = z_inc > 0 ? 0 : lim - 1;
}
} else if (xy_error == 0) {
x += x_inc;
y += y_inc;
n -= 2;
current_p.x() += x_inc * resolution;
current_p.y() += y_inc * resolution;
if (x >= lim || x < 0) {
block_lim.x() += x_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
x = x_inc > 0 ? 0 : lim - 1;
}
if (y >= lim || y < 0) {
block_lim.y() += y_inc * block_size;
_block_key = block_to_hash_key(block_lim);
block = map->search(_block_key);
y = y_inc > 0 ? 0 : lim - 1;
}
}
n--;
return valid;
}
private:
const GPOctoMap *map;
Block *block;
point3f block_lim;
float block_size, resolution;
int dx, dy, dz, error, n;
int x_inc, y_inc, z_inc, xy_error, xz_error, yz_error;
unsigned short index, x, y, z, lim;
BlockHashKey _block_key;
point3f current_p;
};
/// LeafIterator for iterating all leaf nodes in blocks
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator(const GPOctoMap *map) {
assert(map != nullptr);
block_it = map->block_arr.cbegin();
end_block = map->block_arr.cend();
if (map->block_arr.size() > 0) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
} else {
leaf_it = OcTree::LeafIterator();
end_leaf = OcTree::LeafIterator();
}
}
// just for initializing end iterator
LeafIterator(std::unordered_map<BlockHashKey, Block *>::const_iterator block_it,
OcTree::LeafIterator leaf_it)
: block_it(block_it), leaf_it(leaf_it), end_block(block_it), end_leaf(leaf_it) { }
bool operator==(const LeafIterator &other) {
return (block_it == other.block_it) && (leaf_it == other.leaf_it);
}
bool operator!=(const LeafIterator &other) {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
++leaf_it;
if (leaf_it == end_leaf) {
++block_it;
if (block_it != end_block) {
leaf_it = block_it->second->begin_leaf();
end_leaf = block_it->second->end_leaf();
}
}
return *this;
}
OcTreeNode &operator*() const {
return *leaf_it;
}
std::vector<point3f> get_pruned_locs() const {
std::vector<point3f> pruned_locs;
point3f center = get_loc();
float size = get_size();
float x0 = center.x() - size * 0.5 + Block::resolution * 0.5;
float y0 = center.y() - size * 0.5 + Block::resolution * 0.5;
float z0 = center.z() - size * 0.5 + Block::resolution * 0.5;
float x1 = center.x() + size * 0.5;
float y1 = center.y() + size * 0.5;
float z1 = center.z() + size * 0.5;
for (float x = x0; x < x1; x += Block::resolution) {
for (float y = y0; y < y1; y += Block::resolution) {
for (float z = z0; z < z1; z += Block::resolution) {
pruned_locs.emplace_back(x, y, z);
}
}
}
return pruned_locs;
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline point3f get_loc() const {
return block_it->second->get_loc(leaf_it);
}
inline float get_size() const {
return block_it->second->get_size(leaf_it);
}
private:
std::unordered_map<BlockHashKey, Block *>::const_iterator block_it;
std::unordered_map<BlockHashKey, Block *>::const_iterator end_block;
OcTree::LeafIterator leaf_it;
OcTree::LeafIterator end_leaf;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); }
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(block_arr.cend(), OcTree::LeafIterator()); }
OcTreeNode search(point3f p) const;
OcTreeNode search(float x, float y, float z) const;
Block *search(BlockHashKey key) const;
inline float get_block_size() const { return block_size; }
private:
/// @return true if point is inside a bounding box given min and max limits.
inline bool gp_point_in_bbox(const GPPointType &p, const point3f &lim_min, const point3f &lim_max) const {
return (p.first.x() > lim_min.x() && p.first.x() < lim_max.x() &&
p.first.y() > lim_min.y() && p.first.y() < lim_max.y() &&
p.first.z() > lim_min.z() && p.first.z() < lim_max.z());
}
/// Get the bounding box of a pointcloud.
void bbox(const GPPointCloud &cloud, point3f &lim_min, point3f &lim_max) const;
/// Get all block indices inside a bounding box.
void get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
std::vector<BlockHashKey> &blocks) const;
/// Get all points inside a bounding box assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
GPPointCloud &out);
/// @return true if point exists inside a bounding box assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max);
/// Get all points inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const BlockHashKey &key, GPPointCloud &out);
/// @return true if point exists inside a bounding box (block) assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const BlockHashKey &key);
/// Get all points inside an extended block assuming pointcloud has been inserted in rtree before.
int get_gp_points_in_bbox(const ExtendedBlock &block, GPPointCloud &out);
/// @return true if point exists inside an extended block assuming pointcloud has been inserted in rtree before.
int has_gp_points_in_bbox(const ExtendedBlock &block);
/// RTree callback function
static bool count_callback(GPPointType *p, void *arg);
/// RTree callback function
static bool search_callback(GPPointType *p, void *arg);
/// Downsample PCLPointCloud using PCL VoxelGrid Filtering.
void downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const;
/// Sample free training points along sensor beams.
void beam_sample(const point3f &hits, const point3f &origin, PointCloud &frees,
float free_resolution) const;
/// Get training data from one sensor scan.
void get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPPointCloud &xy) const;
float resolution;
float block_size;
unsigned short block_depth;
std::unordered_map<BlockHashKey, Block *> block_arr;
MyRTree rtree;
};
}
#endif // LA3DM_GP_OCTOMAP_H
| 15,859 | 40.957672 | 125 | h |
la3dm | la3dm-master/include/gpoctomap/gpoctree.h | #ifndef LA3DM_GP_OCTREE_H
#define LA3DM_GP_OCTREE_H
#include <stack>
#include <vector>
#include "point3f.h"
#include "gpoctree_node.h"
namespace la3dm {
/// Hash key to index OcTree nodes given depth and the index in that layer.
typedef int OcTreeHashKey;
/// Convert from node to hask key.
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned short index);
/// Convert from hash key to node.
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned short &index);
/*
* @brief A simple OcTree to organize GP occupancy data in one block.
*
* OcTree doesn't store positions of nodes in order to reduce memory usage.
* The nodes in OcTrees are indexed by OcTreeHashKey which can be used to
* retrieve positions later (See Block).
* For the purpose of mapping, this OcTree has fixed depth which should be
* set before using OcTrees.
*/
class OcTree {
friend class GPOctoMap;
public:
OcTree();
~OcTree();
OcTree(const OcTree &other);
OcTree &operator=(const OcTree &other);
/*
* @brief Rursively pruning OcTreeNodes with the same state.
*
* Prune nodes by setting nodes to PRUNED.
* Delete the layer if all nodes are pruned.
*/
bool prune();
/// @return true if this node is a leaf node.
bool is_leaf(OcTreeHashKey key) const;
/// @return true if this node is a leaf node.
bool is_leaf(unsigned short depth, unsigned short index) const;
/// @return true if this node exists and is not pruned.
bool search(OcTreeHashKey key) const;
/// @return Occupancy of the node (without checking if it exists!)
OcTreeNode &operator[](OcTreeHashKey key) const;
/// Leaf iterator for OcTrees: iterate all leaf nodes not pruned.
class LeafIterator : public std::iterator<std::forward_iterator_tag, OcTreeNode> {
public:
LeafIterator() : tree(nullptr) { }
LeafIterator(const OcTree *tree)
: tree(tree != nullptr && tree->node_arr != nullptr ? tree : nullptr) {
if (tree != nullptr) {
stack.emplace(0, 0);
stack.emplace(0, 0);
++(*this);
}
}
LeafIterator(const LeafIterator &other) : tree(other.tree), stack(other.stack) { }
LeafIterator &operator=(const LeafIterator &other) {
tree = other.tree;
stack = other.stack;
return *this;
}
bool operator==(const LeafIterator &other) const {
return (tree == other.tree) &&
(stack.size() == other.stack.size()) &&
(stack.size() == 0 || (stack.size() > 0 &&
(stack.top().depth == other.stack.top().depth) &&
(stack.top().index == other.stack.top().index)));
}
bool operator!=(const LeafIterator &other) const {
return !(this->operator==(other));
}
LeafIterator operator++(int) {
LeafIterator result(*this);
++(*this);
return result;
}
LeafIterator &operator++() {
if (stack.empty()) {
tree = nullptr;
} else {
stack.pop();
while (!stack.empty() && !tree->is_leaf(stack.top().depth, stack.top().index))
single_inc();
if (stack.empty())
tree = nullptr;
}
return *this;
}
inline OcTreeNode &operator*() const {
return (*tree)[get_hash_key()];
}
inline OcTreeNode &get_node() const {
return operator*();
}
inline OcTreeHashKey get_hash_key() const {
OcTreeHashKey key = node_to_hash_key(stack.top().depth, stack.top().index);
return key;
}
protected:
void single_inc() {
StackElement top(stack.top());
stack.pop();
for (int i = 0; i < 8; ++i) {
stack.emplace(top.depth + 1, top.index * 8 + i);
}
}
struct StackElement {
unsigned short depth;
unsigned short index;
StackElement(unsigned short depth, unsigned short index)
: depth(depth), index(index) { }
};
const OcTree *tree;
std::stack<StackElement, std::vector<StackElement> > stack;
};
/// @return the beginning of leaf iterator
inline LeafIterator begin_leaf() const { return LeafIterator(this); };
/// @return the end of leaf iterator
inline LeafIterator end_leaf() const { return LeafIterator(nullptr); };
private:
OcTreeNode **node_arr;
static unsigned short max_depth;
};
}
#endif // LA3DM_GP_OCTREE_H
| 5,274 | 31.561728 | 98 | h |
la3dm | la3dm-master/include/gpoctomap/gpoctree_node.h | #ifndef LA3DM_GP_OCCUPANCY_H
#define LA3DM_GP_OCCUPANCY_H
#include <iostream>
#include <fstream>
namespace la3dm {
/// Occupancy state: before pruning: FREE, OCCUPIED, UNKNOWN; after pruning: PRUNED
enum class State : char {
FREE, OCCUPIED, UNKNOWN, PRUNED
};
/*
* @brief GP regression ouputs and occupancy state.
*
* Occupancy has member variables: m_ivar (m*ivar), ivar (1/var) and State.
* This representation speeds up the updates via BCM.
* Before using this class, set the static member variables first.
*/
class Occupancy {
friend std::ostream &operator<<(std::ostream &os, const Occupancy &oc);
friend std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc);
friend std::ifstream &operator>>(std::ifstream &is, Occupancy &oc);
friend class GPOctoMap;
public:
/*
* @brief Constructors and destructor.
*/
Occupancy() : m_ivar(0.0), ivar(Occupancy::min_ivar), state(State::UNKNOWN) { classified = false; }
Occupancy(float m, float var);
Occupancy(const Occupancy &other) : m_ivar(other.m_ivar), ivar(other.ivar), state(other.state) { }
Occupancy &operator=(const Occupancy &other) {
m_ivar = other.m_ivar;
ivar = other.ivar;
state = other.state;
return *this;
}
~Occupancy() { }
/*
* @brief Bayesian Committee Machine (BCM) update for Gaussian Process regression.
* @param new_m mean resulted from GP regression
* @param new_var variance resulted from GP regression
*/
void update(float new_m, float new_var);
/// Get probability of occupancy.
float get_prob() const;
/// Get variance of occupancy (uncertainty)
inline float get_var() const { return 1.0f / ivar; }
/*
* @brief Get occupancy state of the node.
* @return occupancy state (see State).
*/
inline State get_state() const { return state; }
/// Prune current node; set state to PRUNED.
inline void prune() { state = State::PRUNED; }
/// Only FREE and OCCUPIED nodes can be equal.
inline bool operator==(const Occupancy &rhs) const {
return this->state != State::UNKNOWN && this->state == rhs.state;
}
bool classified;
private:
float m_ivar; // m / var or m * ivar
float ivar; // 1.0 / var
State state;
static float sf2; // signal variance
static float ell; // length-scale
static float noise; // noise variance
static float l; // gamma in logistic functions
static float max_ivar; // minimum variance
static float min_ivar; // maximum variance
static float min_known_ivar; // maximum variance for nodes to be considered as FREE or OCCUPIED
static float free_thresh; // FREE occupancy threshold
static float occupied_thresh; // OCCUPIED occupancy threshold
};
typedef Occupancy OcTreeNode;
}
#endif // LA3DM_GP_OCCUPANCY_H
| 3,150 | 30.51 | 107 | h |
la3dm | la3dm-master/include/gpoctomap/gpregressor.h | #ifndef LA3DM_GP_REGRESSOR_H
#define LA3DM_GP_REGRESSOR_H
#include <Eigen/Dense>
#include <vector>
namespace la3dm {
/*
* @brief A Simple Gaussian Process Regressor
* @param dim dimension of data (2, 3, etc.)
* @param T data type (float, double, etc.)
*/
template<int dim, typename T>
class GPRegressor {
public:
/// Eigen matrix type for training and test data and kernel
using MatrixXType = Eigen::Matrix<T, -1, dim, Eigen::RowMajor>;
using MatrixKType = Eigen::Matrix<T, -1, -1, Eigen::RowMajor>;
using MatrixDKType = Eigen::Matrix<T, -1, 1>;
using MatrixYType = Eigen::Matrix<T, -1, 1>;
GPRegressor(T sf2, T ell, T noise) : sf2(sf2), ell(ell), noise(noise), trained(false) { }
/*
* @brief Train Gaussian Process
* @param x input vector (3N, row major)
* @param y target vector (N)
*/
void train(const std::vector<T> &x, const std::vector<T> &y) {
assert(x.size() % dim == 0 && (int) (x.size() / dim) == y.size());
MatrixXType _x = Eigen::Map<const MatrixXType>(x.data(), x.size() / dim, dim);
MatrixYType _y = Eigen::Map<const MatrixYType>(y.data(), y.size(), 1);
train(_x, _y);
}
/*
* @brief Train Gaussian Process
* @param x input matrix (NX3)
* @param y target matrix (NX1)
*/
void train(const MatrixXType &x, const MatrixYType &y) {
this->x = MatrixXType(x);
covMaterniso3(x, x, K);
// covSparse(x, x, K);
K = K + noise * MatrixKType::Identity(K.rows(), K.cols());
Eigen::LLT<MatrixKType> llt(K);
alpha = llt.solve(y);
L = llt.matrixL();
trained = true;
}
/*
* @brief Predict with Gaussian Process
* @param xs input vector (3M, row major)
* @param m predicted mean vector (M)
* @param var predicted variance vector (M)
*/
void predict(const std::vector<T> &xs, std::vector<T> &m, std::vector<T> &var) const {
assert(xs.size() % dim == 0);
MatrixXType _xs = Eigen::Map<const MatrixXType>(xs.data(), xs.size() / dim, dim);
MatrixYType _m, _var;
predict(_xs, _m, _var);
m.resize(_m.rows());
var.resize(_var.rows());
for (int r = 0; r < _m.rows(); ++r) {
m[r] = _m(r, 0);
var[r] = _var(r, 0);
}
}
/*
* @brief Predict with Gaussian Process
* @param xs input vector (MX3)
* @param m predicted mean matrix (MX1)
* @param var predicted variance matrix (MX1)
*/
void predict(const MatrixXType &xs, MatrixYType &m, MatrixYType &var) const {
assert(trained == true);
MatrixKType Ks;
covMaterniso3(x, xs, Ks);
// covSparse(x, xs, Ks);
m = Ks.transpose() * alpha;
MatrixKType v = L.template triangularView<Eigen::Lower>().solve(Ks);
MatrixDKType Kss;
covMaterniso3(xs, xs, Kss);
// covSparse(xs, xs, Kss);
var = Kss - (v.transpose() * v).diagonal();
}
private:
/*
* @brief Compute Euclid distances between two vectors.
* @param x input vector
* @param z input vecotr
* @return d distance matrix
*/
void dist(const MatrixXType &x, const MatrixXType &z, MatrixKType &d) const {
d = MatrixKType::Zero(x.rows(), z.rows());
for (int i = 0; i < x.rows(); ++i) {
d.row(i) = (z.rowwise() - x.row(i)).rowwise().norm();
}
}
/*
* @brief Matern3 kernel.
* @param x input vector
* @param z input vector
* @return Kxz covariance matrix
*/
void covMaterniso3(const MatrixXType &x, const MatrixXType &z, MatrixKType &Kxz) const {
dist(1.73205 / ell * x, 1.73205 / ell * z, Kxz);
Kxz = ((1 + Kxz.array()) * exp(-Kxz.array())).matrix() * sf2;
}
/*
* @brief Diagonal of Matern3 kernel.
* @return Kxz sf2 * I
*/
void covMaterniso3(const MatrixXType &x, const MatrixXType &z, MatrixDKType &Kxz) const {
Kxz = MatrixDKType::Ones(x.rows()) * sf2;
}
/*
* @brief Sparse kernel.
* @param x input vector
* @param z input vector
* @return Kxz covariance matrix
* @ref A sparse covariance function for exact gaussian process inference in large datasets.
*/
void covSparse(const MatrixXType &x, const MatrixXType &z, MatrixKType &Kxz) const {
dist(x / ell, z / ell, Kxz);
Kxz = ((2 + (Kxz * 2 * 3.1415926).array().cos()) * (1.0 - Kxz.array()) / 3.0 +
(Kxz * 2 * 3.1415926).array().sin() / (2 * 3.1415926)).matrix() * sf2;
for (int i = 0; i < Kxz.rows(); ++i) {
for (int j = 0; j < Kxz.cols(); ++j) {
if (Kxz(i,j) < 0.0) {
Kxz(i,j) = 0.0f;
}
}
}
}
/*
* @brief Diagonal of sparse kernel.
* @return Kxz sf2 * I
*/
void covSparse(const MatrixXType &x, const MatrixXType &z, MatrixDKType &Kxz) const {
Kxz = MatrixDKType::Ones(x.rows()) * sf2;
}
T sf2; // signal variance
T ell; // length-scale
T noise; // noise variance
MatrixXType x; // temporary storage of training data
MatrixKType K;
MatrixYType alpha;
MatrixKType L;
bool trained; // true if gpregressor has been trained
};
typedef GPRegressor<3, float> GPR3f;
}
#endif // LA3DM_GP_REGRESSOR_H
| 5,931 | 33.894118 | 100 | h |
la3dm | la3dm-master/src/bgkloctomap/bgklblock.cpp | #include "bgklblock.h"
#include <queue>
#include <algorithm>
namespace la3dm {
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth) {
std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
std::queue<point3f> center_q;
center_q.push(point3f(0.0f, 0.0f, 0.0f));
for (unsigned short depth = 0; depth < max_depth; ++depth) {
unsigned short q_size = (unsigned short) center_q.size();
float half_size = (float) (resolution * pow(2, max_depth - depth - 1) * 0.5f);
for (unsigned short index = 0; index < q_size; ++index) {
point3f center = center_q.front();
center_q.pop();
key_loc_map.emplace(node_to_hash_key(depth, index), center);
if (depth == max_depth - 1)
continue;
for (unsigned short i = 0; i < 8; ++i) {
float x = (float) (center.x() + half_size * (i & 4 ? 0.5 : -0.5));
float y = (float) (center.y() + half_size * (i & 2 ? 0.5 : -0.5));
float z = (float) (center.z() + half_size * (i & 1 ? 0.5 : -0.5));
center_q.emplace(x, y, z);
}
}
}
return key_loc_map;
}
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(
const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map, unsigned short max_depth) {
std::vector<std::pair<OcTreeHashKey, point3f>> temp;
for (auto it = key_loc_map.begin(); it != key_loc_map.end(); ++it) {
unsigned short depth, index;
hash_key_to_node(it->first, depth, index);
if (depth == max_depth - 1)
temp.push_back(std::make_pair(it->first, it->second));
}
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.x() < p2.second.x();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.y() < p2.second.y();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.z() < p2.second.z();
});
std::unordered_map<unsigned short, OcTreeHashKey> index_map;
int index = 0;
for (auto it = temp.cbegin(); it != temp.cend(); ++it, ++index) {
index_map.insert(std::make_pair(index, it->first));
}
return index_map;
};
BlockHashKey block_to_hash_key(point3f center) {
return block_to_hash_key(center.x(), center.y(), center.z());
}
BlockHashKey block_to_hash_key(float x, float y, float z) {
return (int64_t(x / (double) Block::size + 524288.5) << 40) |
(int64_t(y / (double) Block::size + 524288.5) << 20) |
(int64_t(z / (double) Block::size + 524288.5));
}
point3f hash_key_to_block(BlockHashKey key) {
return point3f(((key >> 40) - 524288) * Block::size,
(((key >> 20) & 0xFFFFF) - 524288) * Block::size,
((key & 0xFFFFF) - 524288) * Block::size);
}
ExtendedBlock get_extended_block(BlockHashKey key) {
ExtendedBlock blocks;
point3f center = hash_key_to_block(key);
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = key;
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
float Block::resolution = 0.1f;
float Block::size = 0.8f;
unsigned short Block::cell_num = static_cast<unsigned short>(round(Block::size / Block::resolution));
std::unordered_map<OcTreeHashKey, point3f> Block::key_loc_map;
std::unordered_map<unsigned short, OcTreeHashKey> Block::index_map;
Block::Block() : OcTree(), center(0.0f, 0.0f, 0.0f) { }
Block::Block(point3f center) : OcTree(), center(center) { }
ExtendedBlock Block::get_extended_block() const {
ExtendedBlock blocks;
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = block_to_hash_key(x, y, z);
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
OcTreeHashKey Block::get_node(unsigned short x, unsigned short y, unsigned short z) const {
unsigned short index = x + y * Block::cell_num + z * Block::cell_num * Block::cell_num;
return Block::index_map[index];
}
point3f Block::get_point(unsigned short x, unsigned short y, unsigned short z) const {
return Block::key_loc_map[get_node(x, y, z)] + center;
}
void Block::get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const {
int xx = static_cast<int>((p.x() - center.x()) / resolution + Block::cell_num / 2);
int yy = static_cast<int>((p.y() - center.y()) / resolution + Block::cell_num / 2);
int zz = static_cast<int>((p.z() - center.z()) / resolution + Block::cell_num / 2);
auto clip = [](int a) -> int { return std::max(0, std::min(a, Block::cell_num - 1)); };
x = static_cast<unsigned short>(clip(xx));
y = static_cast<unsigned short>(clip(yy));
z = static_cast<unsigned short>(clip(zz));
}
OcTreeNode& Block::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
OcTreeNode& Block::search(point3f p) const {
unsigned short x, y, z;
get_index(p, x, y, z);
return operator[](get_node(x, y, z));
}
} | 6,731 | 41.075 | 109 | cpp |
la3dm | la3dm-master/src/bgkloctomap/bgkloctomap.cpp | #include <algorithm>
#include <ros/ros.h>
#include <pcl/filters/voxel_grid.h>
#include "bgkloctomap.h"
#include "bgklinference.h"
using std::vector;
// #define DEBUG true;
#ifdef DEBUG
#include <iostream>
#define Debug_Msg(msg) {\
std::cout << "Debug: " << msg << std::endl; }
#endif
namespace la3dm {
BGKLOctoMap::BGKLOctoMap() : BGKLOctoMap(0.1f, // resolution
4, // block_depth
1.0, // sf2
1.0, // ell
0.3f, // free_thresh
0.7f, // occupied_thresh
1.0f, // var_thresh
1.0f, // prior_A
1.0f // prior_B
) { }
BGKLOctoMap::BGKLOctoMap(float resolution,
unsigned short block_depth,
float sf2,
float ell,
float free_thresh,
float occupied_thresh,
float var_thresh,
float prior_A,
float prior_B)
: resolution(resolution), block_depth(block_depth),
block_size((float) pow(2, block_depth - 1) * resolution) {
Block::resolution = resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
Block::index_map = init_index_map(Block::key_loc_map, block_depth);
OcTree::max_depth = block_depth;
OcTreeNode::sf2 = sf2;
OcTreeNode::ell = ell;
OcTreeNode::free_thresh = free_thresh;
OcTreeNode::occupied_thresh = occupied_thresh;
OcTreeNode::var_thresh = var_thresh;
OcTreeNode::prior_A = prior_A;
OcTreeNode::prior_B = prior_B;
}
BGKLOctoMap::~BGKLOctoMap() {
for (auto it = block_arr.begin(); it != block_arr.end(); ++it) {
if (it->second != nullptr) {
delete it->second;
}
}
}
void BGKLOctoMap::set_resolution(float resolution) {
this->resolution = resolution;
Block::resolution = resolution;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKLOctoMap::set_block_depth(unsigned short max_depth) {
this->block_depth = max_depth;
OcTree::max_depth = max_depth;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKLOctoMap::insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res, float max_range) {
#ifdef DEBUG
Debug_Msg("Insert pointcloud: " << "cloud size: " << cloud.size() << " origin: " << origin);
#endif
////////// Preparation //////////////////////////
/////////////////////////////////////////////////
GPLineCloud xy;
GPLineCloud rays;
vector<int> ray_idx;
// const int ray_size = rays.size();
// std::array<int, ray_size> ray_keys;
get_training_data(cloud, origin, ds_resolution, free_res, max_range, xy, rays, ray_idx);
// vector<int> ray_keys(rays.size(), 0);
assert (ray_idx.size() == xy.size());
// std::cout << "N rays: " << rays.size() << std::endl;
// std::cout << "vec size: " << ray_keys.size() << std::endl;
#ifdef DEBUG
Debug_Msg("Training data size: " << xy.size());
#endif
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
// std::unordered_map<BlockHashKey, GPLineCloud> key_train_data_map;
for (int k = 0; k < xy.size(); ++k) {
float p[] = {xy[k].first.x0(), xy[k].first.y0(), xy[k].first.z0()};
rtree.Insert(p, p, k);
}
/////////////////////////////////////////////////
////////// Training /////////////////////////////
/////////////////////////////////////////////////
vector<BlockHashKey> test_blocks;
std::unordered_map<BlockHashKey, BGKL3f *> bgkl_arr;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
ExtendedBlock eblock = get_extended_block(key);
if (has_gp_points_in_bbox(eblock))
#ifdef OPENMP
#pragma omp critical
#endif
{
test_blocks.push_back(key);
};
// GPLineCloud block_xy;
vector<int> xy_idx;
get_gp_points_in_bbox(key, xy_idx);
if (xy_idx.size() < 1)
continue;
vector<int> ray_keys(rays.size(), 0);
vector<float> block_x, block_y;
for (int j = 0; j < xy_idx.size(); ++j) {
#ifdef OPENMP
#pragma omp critical
#endif
{
if (ray_idx[xy_idx[j]] == -1) {
block_x.push_back(xy[xy_idx[j]].first.x0());
block_x.push_back(xy[xy_idx[j]].first.y0());
block_x.push_back(xy[xy_idx[j]].first.z0());
block_x.push_back(xy[xy_idx[j]].first.x0());
block_x.push_back(xy[xy_idx[j]].first.y0());
block_x.push_back(xy[xy_idx[j]].first.z0());
block_y.push_back(1.0f);
}
else if (ray_keys[ray_idx[xy_idx[j]]] == 0) {
ray_keys[ray_idx[xy_idx[j]]] = 1;
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.x0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.y0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.z0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.x1());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.y1());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.z1());
block_y.push_back(0.0f);
}
}
};
// std::cout << "number of training blocks" << block_y.size() << std::endl;
BGKL3f *bgkl = new BGKL3f(OcTreeNode::sf2, OcTreeNode::ell);
bgkl->train(block_x, block_y);
#ifdef OPENMP
#pragma omp critical
#endif
{
bgkl_arr.emplace(key, bgkl);
};
}
#ifdef DEBUG
Debug_Msg("Training done");
Debug_Msg("Prediction: block number: " << test_blocks.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
#ifdef OPENMP
#pragma omp critical
#endif
{
if (block_arr.find(key) == block_arr.end())
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
Block *block = block_arr[key];
vector<float> xs;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
point3f p = block->get_loc(leaf_it);
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
}
ExtendedBlock eblock = block->get_extended_block();
for (auto block_it = eblock.cbegin(); block_it != eblock.cend(); ++block_it) {
auto bgkl = bgkl_arr.find(*block_it);
if (bgkl == bgkl_arr.end())
continue;
vector<float> ybar, kbar;
bgkl->second->predict(xs, ybar, kbar);
int j = 0;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it, ++j) {
OcTreeNode &node = leaf_it.get_node();
auto node_loc = block->get_loc(leaf_it);
// if (node_loc.x() == 7.45 && node_loc.y() == 10.15 && node_loc.z() == 1.15) {
// std::cout << "updating the node " << ybar[j] << " " << kbar[j] << std::endl;
// }
// Only need to update if kernel density total kernel density est > 0
// TODO param out change threshold?
if (kbar[j] > 0.001f)
node.update(ybar[j], kbar[j]);
}
}
}
#ifdef DEBUG
Debug_Msg("Prediction done");
#endif
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
///////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
for (auto it = bgkl_arr.begin(); it != bgkl_arr.end(); ++it) {
delete it->second;
}
// ray_keys.clear();
rtree.RemoveAll();
}
void BGKLOctoMap::get_bbox(point3f &lim_min, point3f &lim_max) const {
lim_min = point3f(0, 0, 0);
lim_max = point3f(0, 0, 0);
GPLineCloud centers;
for (auto it = block_arr.cbegin(); it != block_arr.cend(); ++it) {
centers.emplace_back(point6f(it->second->get_center()), 1);
}
if (centers.size() > 0) {
bbox(centers, lim_min, lim_max);
lim_min -= point3f(block_size, block_size, block_size) * 0.5;
lim_max += point3f(block_size, block_size, block_size) * 0.5;
}
}
void BGKLOctoMap::get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPLineCloud &xy, GPLineCloud &rays, vector<int> &ray_idx) const {
PCLPointCloud sampled_hits;
downsample(cloud, sampled_hits, ds_resolution);
std::cout << "Sampled points: " << sampled_hits.size() << std::endl;
PCLPointCloud frees;
frees.height = 1;
frees.width = 0;
rays.clear();
ray_idx.clear();
xy.clear();
int idx = 0;
for (auto it = sampled_hits.begin(); it != sampled_hits.end(); ++it) {
point3f p(it->x, it->y, it->z);
if (max_range > 0) {
double l = (p - origin).norm();
if (l > max_range)
continue;
}
// point6f p6f(p);
// xy.emplace_back(p6f, 1.0f);
// ray_idx.push_back(-1);
float l = (float) sqrt((p.x() - origin.x()) * (p.x() - origin.x()) + (p.y() - origin.y()) * (p.y() - origin.y()) + (p.z() - origin.z()) * (p.z() - origin.z()));
float nx = (p.x() - origin.x()) / l;
float ny = (p.y() - origin.y()) / l;
float nz = (p.z() - origin.z()) / l;
point3f occ_endpt(origin.x() + nx * l, origin.y() + ny * l, origin.z() + nz * l);
xy.emplace_back(point6f(occ_endpt), 1.0f);
ray_idx.push_back(-1);
// point3f free_endpt(origin.x() + nx * (l - free_resolution), origin.y() + ny * (l - free_resolution), origin.z() + nz * (l - 0.1f));
// point6f line6f(origin, free_endpt);
// rays.emplace_back(line6f, 0.0f);
PointCloud frees_n;
beam_sample(occ_endpt, origin, frees_n, free_resolution);
frees.push_back(PCLPointType(origin.x(), origin.y(), origin.z()));
xy.emplace_back(point6f(origin.x(), origin.y(), origin.z()), 0.0f);
ray_idx.push_back(idx);
for (auto p = frees_n.begin(); p != frees_n.end(); ++p) {
xy.emplace_back(point6f(p->x(), p->y(), p->z()), 0.0f);
ray_idx.push_back(idx);
}
l = l - free_resolution;
point3f free_endpt(origin.x() + nx * l, origin.y() + ny * l, origin.z() + nz * l);
point6f line6f(origin, free_endpt);
rays.emplace_back(line6f, 0.0f);
frees.clear();
++idx;
}
}
void BGKLOctoMap::downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const {
if (ds_resolution < 0) {
out = in;
return;
}
PCLPointCloud::Ptr pcl_in(new PCLPointCloud(in));
pcl::VoxelGrid<PCLPointType> sor;
sor.setInputCloud(pcl_in);
sor.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
sor.filter(out);
}
void BGKLOctoMap::beam_sample(const point3f &hit, const point3f &origin, PointCloud &frees,
float free_resolution) const {
frees.clear();
float x0 = origin.x();
float y0 = origin.y();
float z0 = origin.z();
float x = hit.x();
float y = hit.y();
float z = hit.z();
float l = (float) sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0) + (z - z0) * (z - z0));
float nx = (x - x0) / l;
float ny = (y - y0) / l;
float nz = (z - z0) / l;
float d = l - free_resolution;
while (d > 0.0) {
frees.emplace_back(x0 + nx * d, y0 + ny * d, z0 + nz * d);
d -= free_resolution;
}
}
void BGKLOctoMap::bbox(const GPLineCloud &cloud, point3f &lim_min, point3f &lim_max) const {
vector<float> x, y, z;
for (auto it = cloud.cbegin(); it != cloud.cend(); ++it) {
x.push_back(it->first.x0());
x.push_back(it->first.x1());
y.push_back(it->first.y0());
y.push_back(it->first.y1());
z.push_back(it->first.z0());
z.push_back(it->first.z1());
}
auto xlim = std::minmax_element(x.cbegin(), x.cend());
auto ylim = std::minmax_element(y.cbegin(), y.cend());
auto zlim = std::minmax_element(z.cbegin(), z.cend());
lim_min.x() = *xlim.first;
lim_min.y() = *ylim.first;
lim_min.z() = *zlim.first;
lim_max.x() = *xlim.second;
lim_max.y() = *ylim.second;
lim_max.z() = *zlim.second;
}
void BGKLOctoMap::get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<BlockHashKey> &blocks) const {
for (float x = lim_min.x() - block_size; x <= lim_max.x() + 2 * block_size; x += block_size) {
for (float y = lim_min.y() - block_size; y <= lim_max.y() + 2 * block_size; y += block_size) {
for (float z = lim_min.z() - block_size; z <= lim_max.z() + 2 * block_size; z += block_size) {
blocks.push_back(block_to_hash_key(x, y, z));
}
}
}
}
int BGKLOctoMap::get_gp_points_in_bbox(const BlockHashKey &key,
vector<int> &out) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return get_gp_points_in_bbox(lim_min, lim_max, out);
}
int BGKLOctoMap::has_gp_points_in_bbox(const BlockHashKey &key) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return has_gp_points_in_bbox(lim_min, lim_max);
}
int BGKLOctoMap::get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<int> &out) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKLOctoMap::search_callback, static_cast<void *>(&out));
}
int BGKLOctoMap::has_gp_points_in_bbox(const point3f &lim_min,
const point3f &lim_max) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKLOctoMap::count_callback, NULL);
}
bool BGKLOctoMap::count_callback(int k, void *arg) {
return false;
}
bool BGKLOctoMap::search_callback(int k, void *arg) {
// GPLineCloud *out = static_cast<GPLineCloud *>(arg);
vector<int> *out = static_cast<vector<int> *>(arg);
out->push_back(k);
return true;
}
int BGKLOctoMap::has_gp_points_in_bbox(const ExtendedBlock &block) {
for (auto it = block.cbegin(); it != block.cend(); ++it) {
if (has_gp_points_in_bbox(*it) > 0)
return 1;
}
return 0;
}
int BGKLOctoMap::get_gp_points_in_bbox(const ExtendedBlock &block,
vector<int> &out) {
int n = 0;
for (auto it = block.cbegin(); it != block.cend(); ++it) {
n += get_gp_points_in_bbox(*it, out);
}
return n;
}
Block *BGKLOctoMap::search(BlockHashKey key) const {
auto block = block_arr.find(key);
if (block == block_arr.end()) {
return nullptr;
} else {
return block->second;
}
}
OcTreeNode BGKLOctoMap::search(point3f p) const {
Block *block = search(block_to_hash_key(p));
if (block == nullptr) {
return OcTreeNode();
} else {
return OcTreeNode(block->search(p));
}
}
OcTreeNode BGKLOctoMap::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
}
| 18,619 | 36.24 | 172 | cpp |
la3dm | la3dm-master/src/bgkloctomap/bgkloctomap_server.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include <pcl_ros/transforms.h>
#include <pcl/filters/voxel_grid.h>
#include "markerarray_pub.h"
#include "bgkloctomap.h"
tf::TransformListener *listener;
std::string frame_id("/map");
la3dm::BGKLOctoMap *map;
la3dm::MarkerArrayPub *m_pub_occ, *m_pub_free;
//startup parameters
tf::Vector3 last_position;
tf::Quaternion last_orientation;
bool first = true;
double position_change_thresh = 0.1;
double orientation_change_thresh = 0.2;
bool updated = false;
//Universal parameters
std::string map_topic_occ("/occupied_cells_vis_array");
std::string map_topic_free("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 0.1;
double ell = 0.2;
double free_resolution = 0.65;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = true;
//BGKL parameters
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
void cloudHandler(const sensor_msgs::PointCloud2ConstPtr &cloud) {
tf::StampedTransform transform;
try {
listener->waitForTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, ros::Duration(5.0));
listener->lookupTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, transform); //ros::Time::now() -- Don't use this because processing time delay breaks it
} catch (tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
return;
}
ros::Time start = ros::Time::now();
la3dm::point3f origin;
tf::Vector3 translation = transform.getOrigin();
tf::Quaternion orientation = transform.getRotation();
if (first || orientation.angleShortestPath(last_orientation) > orientation_change_thresh || translation.distance(last_position) > position_change_thresh)
{
ROS_INFO_STREAM("Cloud received");
last_position = translation;
last_orientation = orientation;
origin.x() = (float) translation.x();
origin.y() = (float) translation.y();
origin.z() = (float) translation.z();
sensor_msgs::PointCloud2 cloud_map;
pcl_ros::transformPointCloud(frame_id, *cloud, cloud_map, *listener);
//pointer required for downsampling
la3dm::PCLPointCloud::Ptr pcl_cloud (new la3dm::PCLPointCloud());
pcl::fromROSMsg(cloud_map, *pcl_cloud);
//downsample for faster mapping
la3dm::PCLPointCloud filtered_cloud;
pcl::VoxelGrid<pcl::PointXYZ> filterer;
filterer.setInputCloud(pcl_cloud);
filterer.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
filterer.filter(filtered_cloud);
if(filtered_cloud.size() > 5){
map->insert_pointcloud(filtered_cloud, origin, (float) resolution, (float) free_resolution, (float) max_range);
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("One cloud finished in " << (end - start).toSec() << "s");
updated = true;
}
if (updated)
{
ros::Time start2 = ros::Time::now();
m_pub_occ->clear();
m_pub_free->clear();
for (auto it = map->begin_leaf(); it != map->end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size)
{
m_pub_occ->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_occ->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution());
}
}
}
else if(it.get_node().get_state() == la3dm::State::FREE)
{
if (original_size)
{
m_pub_free->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_free->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution(), it.get_node().get_prob());
}
}
}
}
updated = false;
m_pub_occ->publish();
m_pub_free->publish();
ros::Time end2 = ros::Time::now();
ROS_INFO_STREAM("One map published in " << (end2 - start2).toSec() << "s");
}
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgkloctomap_server");
ros::NodeHandle nh("~");
//incoming pointcloud topic, this could be put into the .yaml too
std::string cloud_topic("/velodyne_points");
//Universal parameters
nh.param<std::string>("topic", map_topic_occ, map_topic_occ);
nh.param<std::string>("topic_free", map_topic_free, map_topic_free);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
//BKGL parameters
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"topic: " << map_topic_occ << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B
);
map = new la3dm::BGKLOctoMap(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B);
ros::Subscriber point_sub = nh.subscribe<sensor_msgs::PointCloud2>(cloud_topic, 1, cloudHandler);
m_pub_occ = new la3dm::MarkerArrayPub(nh, map_topic_occ, resolution);
m_pub_free = new la3dm::MarkerArrayPub(nh, map_topic_free, resolution);
listener = new tf::TransformListener();
while(ros::ok())
{
ros::spin();
}
return 0;
}
| 7,550 | 35.302885 | 177 | cpp |
la3dm | la3dm-master/src/bgkloctomap/bgkloctomap_static_node.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include "bgkloctomap.h"
#include "markerarray_pub.h"
void load_pcd(std::string filename, la3dm::point3f &origin, la3dm::PCLPointCloud &cloud) {
pcl::PCLPointCloud2 cloud2;
Eigen::Vector4f _origin;
Eigen::Quaternionf orientaion;
pcl::io::loadPCDFile(filename, cloud2, _origin, orientaion);
pcl::fromPCLPointCloud2(cloud2, cloud);
origin.x() = _origin[0];
origin.y() = _origin[1];
origin.z() = _origin[2];
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgkloctomap_static_node");
ros::NodeHandle nh("~");
std::string dir;
std::string prefix;
int scan_num = 0;
std::string map_topic("/occupied_cells_vis_array");
std::string map_topic2("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 1.0;
double ell = 1.0;
double free_resolution = 0.5;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = false;
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
nh.param<std::string>("dir", dir, dir);
nh.param<std::string>("prefix", prefix, prefix);
nh.param<std::string>("topic", map_topic, map_topic);
nh.param<std::string>("topic2", map_topic2, map_topic2);
nh.param<int>("scan_num", scan_num, scan_num);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"dir: " << dir << std::endl <<
"prefix: " << prefix << std::endl <<
"topic: " << map_topic << std::endl <<
"scan_sum: " << scan_num << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B
);
la3dm::BGKLOctoMap map(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B);
ros::Time start = ros::Time::now();
for (int scan_id = 1; scan_id <= scan_num; ++scan_id) {
la3dm::PCLPointCloud cloud;
la3dm::point3f origin;
std::string filename(dir + "/" + prefix + "_" + std::to_string(scan_id) + ".pcd");
load_pcd(filename, origin, cloud);
map.insert_pointcloud(cloud, origin, resolution, free_resolution, max_range);
ROS_INFO_STREAM("Scan " << scan_id << " done");
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("Mapping finished in " << (end - start).toSec() << "s");
///////// Compute Frontiers /////////////////////
// ROS_INFO_STREAM("Computing frontiers");
// la3dm::MarkerArrayPub f_pub(nh, "frontier_map", resolution);
// for (auto it = map.begin_leaf(); it != map.end_leaf(); ++it) {
// la3dm::point3f p = it.get_loc();
// if (p.z() > 1.0 || p.z() < 0.3)
// continue;
// if (it.get_node().get_var() > 0.02 &&
// it.get_node().get_prob() < 0.3) {
// f_pub.insert_point3d(p.x(), p.y(), p.z());
// }
// }
// f_pub.publish();
//////// Test Raytracing //////////////////
// la3dm::MarkerArrayPub ray_pub(nh, "/ray", resolution);
// la3dm::BGKLOctoMap::RayCaster ray(&map, la3dm::point3f(1, 1, 0.3), la3dm::point3f(6, 7, 8));
// while (!ray.end()) {
// la3dm::point3f p;
// la3dm::OcTreeNode node;
// la3dm::BlockHashKey block_key;
// la3dm::OcTreeHashKey node_key;
// if (ray.next(p, node, block_key, node_key)) {
// ray_pub.insert_point3d(p.x(), p.y(), p.z());
// }
// }
// ray_pub.publish();
///////// Publish Map /////////////////////
la3dm::MarkerArrayPub m_pub(nh, map_topic, resolution);
la3dm::MarkerArrayPub m_pub2(nh, map_topic2, resolution);
if (min_z == max_z) {
la3dm::point3f lim_min, lim_max;
map.get_bbox(lim_min, lim_max);
min_z = lim_min.z();
max_z = lim_max.z();
}
for (auto it = map.begin_leaf(); it != map.end_leaf(); ++it){
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size) {
m_pub.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
} else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution());
}
}
else if (it.get_node().get_state() == la3dm::State::FREE) {
if (original_size) {
m_pub2.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
} else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub2.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution(), it.get_node().get_prob());
}
}
}
m_pub.publish();
m_pub2.publish();
ros::spin();
return 0;
}
| 6,720 | 38.304094 | 128 | cpp |
la3dm | la3dm-master/src/bgkloctomap/bgkloctree.cpp | #include "bgkloctree.h"
#include <cmath>
namespace la3dm {
unsigned short OcTree::max_depth = 0;
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned short index) {
return (depth << 16) + index;
}
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned short &index) {
depth = (unsigned short) (key >> 16);
index = (unsigned short) (key & 0xFFFF);
}
OcTree::OcTree() {
if (max_depth <= 0)
node_arr = nullptr;
else {
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
node_arr[i] = new OcTreeNode[(int) pow(8, i)]();
}
}
}
OcTree::~OcTree() {
if (node_arr != nullptr) {
for (unsigned short i = 0; i < max_depth; ++i) {
if (node_arr[i] != nullptr) {
delete[] node_arr[i];
}
}
delete[] node_arr;
}
}
OcTree::OcTree(const OcTree &other) {
if (other.node_arr == nullptr) {
node_arr = nullptr;
return;
}
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (other.node_arr[i] != nullptr) {
int n = (int) pow(8, i);
node_arr[i] = new OcTreeNode[n]();
std::copy(node_arr[i], node_arr[i] + n, other.node_arr[i]);
} else
node_arr[i] = nullptr;
}
}
OcTree &OcTree::operator=(const OcTree &other) {
OcTreeNode **local_node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (local_node_arr[i] != nullptr) {
int n = (int) pow(8, i);
local_node_arr[i] = new OcTreeNode[n]();
std::copy(local_node_arr[i], local_node_arr[i] + n, other.node_arr[i]);
} else
local_node_arr[i] = nullptr;
}
node_arr = local_node_arr;
return *this;
}
bool OcTree::is_leaf(unsigned short depth, unsigned short index) const {
if (node_arr != nullptr && node_arr[depth] != nullptr && node_arr[depth][index].get_state() != State::PRUNED) {
if (depth + 1 < max_depth) {
if (node_arr[depth + 1] == nullptr || node_arr[depth + 1][index * 8].get_state() == State::PRUNED)
return true;
} else {
return true;
}
}
return false;
}
bool OcTree::is_leaf(OcTreeHashKey key) const {
unsigned short depth = 0;
unsigned short index = 0;
hash_key_to_node(key, depth, index);
return is_leaf(depth, index);
}
bool OcTree::search(OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr != nullptr &&
node_arr[depth] != nullptr &&
node_arr[depth][index].get_state() != State::PRUNED;
}
bool OcTree::prune() {
if (node_arr == nullptr)
return false;
bool pruned = false;
for (unsigned short depth = max_depth - 1; depth > 0; --depth) {
OcTreeNode *layer = node_arr[depth];
OcTreeNode *parent_layer = node_arr[depth - 1];
if (layer == nullptr)
continue;
bool empty_layer = true;
unsigned int n = (unsigned int) pow(8, depth);
for (unsigned short index = 0; index < n; index += 8) {
State state = layer[index].get_state();
if (state == State::UNKNOWN) {
empty_layer = false;
continue;
}
if (state == State::PRUNED)
continue;
bool collapsible = true;
for (unsigned short i = 1; i < 8; ++i) {
if (layer[index + i].get_state() != state) {
collapsible = false;
continue;
}
}
if (collapsible) {
parent_layer[(int) floor(index / 8)] = layer[index];
for (unsigned short i = 0; i < 8; ++i) {
layer[index + i].prune();
}
pruned = true;
} else {
empty_layer = false;
}
}
if (empty_layer) {
delete[] layer;
node_arr[depth] = nullptr;
}
}
return pruned;
}
OcTreeNode &OcTree::operator[](OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr[depth][index];
}
} | 4,955 | 30.769231 | 119 | cpp |
la3dm | la3dm-master/src/bgkloctomap/bgkloctree_node.cpp | #include "bgkloctree_node.h"
#include <cmath>
namespace la3dm {
/// Default static values
float Occupancy::sf2 = 1.0f;
float Occupancy::ell = 1.0f;
float Occupancy::free_thresh = 0.3f;
float Occupancy::occupied_thresh = 0.7f;
float Occupancy::var_thresh = 1000.0f;
float Occupancy::prior_A = 0.5f;
float Occupancy::prior_B = 0.5f;
Occupancy::Occupancy(float A, float B) : m_A(Occupancy::prior_A + A), m_B(Occupancy::prior_B + B) {
classified = false;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNKNOWN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
float Occupancy::get_prob() const {
return m_A / (m_A + m_B);
}
void Occupancy::update(float ybar, float kbar) {
classified = true;
m_A += ybar;
m_B += kbar - ybar;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNKNOWN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc) {
os.write((char *) &oc.m_A, sizeof(oc.m_A));
os.write((char *) &oc.m_B, sizeof(oc.m_B));
return os;
}
std::ifstream &operator>>(std::ifstream &is, Occupancy &oc) {
float m_A, m_B;
is.read((char *) &m_A, sizeof(m_A));
is.read((char *) &m_B, sizeof(m_B));
oc = OcTreeNode(m_A, m_B);
return is;
}
std::ostream &operator<<(std::ostream &os, const Occupancy &oc) {
return os << '(' << oc.m_A << ' ' << oc.m_B << ' ' << oc.get_prob() << ')';
}
} | 2,123 | 32.714286 | 117 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvblock.cpp | #include "bgklvblock.h"
#include <queue>
#include <algorithm>
namespace la3dm {
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth) {
std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
std::queue<point3f> center_q;
center_q.push(point3f(0.0f, 0.0f, 0.0f));
for (unsigned short depth = 0; depth < max_depth; ++depth) {
unsigned short q_size = (unsigned short) center_q.size();
float half_size = (float) (resolution * pow(2, max_depth - depth - 1) * 0.5f);
for (unsigned long index = 0; index < q_size; ++index) {
point3f center = center_q.front();
center_q.pop();
key_loc_map.emplace(node_to_hash_key(depth, index), center);
if (depth == max_depth - 1)
continue;
for (unsigned short i = 0; i < 8; ++i) {
float x = (float) (center.x() + half_size * (i & 4 ? 0.5 : -0.5));
float y = (float) (center.y() + half_size * (i & 2 ? 0.5 : -0.5));
float z = (float) (center.z() + half_size * (i & 1 ? 0.5 : -0.5));
center_q.emplace(x, y, z);
}
}
}
return key_loc_map;
}
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(
const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map, unsigned short max_depth) {
std::vector<std::pair<OcTreeHashKey, point3f>> temp;
for (auto it = key_loc_map.begin(); it != key_loc_map.end(); ++it) {
unsigned short depth;
unsigned long index;
hash_key_to_node(it->first, depth, index);
if (depth == max_depth - 1)
temp.push_back(std::make_pair(it->first, it->second));
}
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.x() < p2.second.x();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.y() < p2.second.y();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.z() < p2.second.z();
});
std::unordered_map<unsigned short, OcTreeHashKey> index_map;
int index = 0;
for (auto it = temp.cbegin(); it != temp.cend(); ++it, ++index) {
index_map.insert(std::make_pair(index, it->first));
}
return index_map;
};
BlockHashKey block_to_hash_key(point3f center) {
return block_to_hash_key(center.x(), center.y(), center.z());
}
BlockHashKey block_to_hash_key(float x, float y, float z) {
return (int64_t(x / (double) Block::size + 524288.5) << 40) |
(int64_t(y / (double) Block::size + 524288.5) << 20) |
(int64_t(z / (double) Block::size + 524288.5));
}
point3f hash_key_to_block(BlockHashKey key) {
return point3f(((key >> 40) - 524288) * Block::size,
(((key >> 20) & 0xFFFFF) - 524288) * Block::size,
((key & 0xFFFFF) - 524288) * Block::size);
}
ExtendedBlock get_extended_block(BlockHashKey key) {
ExtendedBlock blocks;
point3f center = hash_key_to_block(key);
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = key;
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
float Block::resolution = 0.1f;
float Block::size = 0.8f;
unsigned short Block::cell_num = static_cast<unsigned short>(round(Block::size / Block::resolution));
std::unordered_map<OcTreeHashKey, point3f> Block::key_loc_map;
std::unordered_map<unsigned short, OcTreeHashKey> Block::index_map;
Block::Block() : OcTree(), center(0.0f, 0.0f, 0.0f) { }
Block::Block(point3f center) : OcTree(), center(center) { }
ExtendedBlock Block::get_extended_block() const {
ExtendedBlock blocks;
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = block_to_hash_key(x, y, z);
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
OcTreeHashKey Block::get_node(unsigned short x, unsigned short y, unsigned short z) const {
unsigned short index = x + y * Block::cell_num + z * Block::cell_num * Block::cell_num;
return Block::index_map[index];
}
point3f Block::get_point(unsigned short x, unsigned short y, unsigned short z) const {
return Block::key_loc_map[get_node(x, y, z)] + center;
}
void Block::get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const {
int xx = static_cast<int>((p.x() - center.x()) / resolution + Block::cell_num / 2);
int yy = static_cast<int>((p.y() - center.y()) / resolution + Block::cell_num / 2);
int zz = static_cast<int>((p.z() - center.z()) / resolution + Block::cell_num / 2);
auto clip = [](int a) -> int { return std::max(0, std::min(a, Block::cell_num - 1)); };
x = static_cast<unsigned short>(clip(xx));
y = static_cast<unsigned short>(clip(yy));
z = static_cast<unsigned short>(clip(zz));
}
OcTreeNode& Block::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
OcTreeNode& Block::search(point3f p) const {
unsigned short x, y, z;
get_index(p, x, y, z);
return operator[](get_node(x, y, z));
}
} | 6,757 | 40.975155 | 109 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvoctomap.cpp | #include <algorithm>
#include <pcl/filters/voxel_grid.h>
#include "bgklvoctomap.h"
#include "bgklvinference.h"
#include <iostream>
using std::vector;
//#define DEBUG true;
#ifdef DEBUG
#include <iostream>
#define Debug_Msg(msg) {\
std::cout << "Debug: " << msg << std::endl; }
#endif
namespace la3dm {
BGKLVOctoMap::BGKLVOctoMap() : BGKLVOctoMap(0.1f, // resolution
4, // block_depth
1.0, // sf2
1.0, // ell
0.3f, // free_thresh
0.7f, // occupied_thresh
1.0f, // var_thresh
1.0f, // prior_A
1.0f, // prior_B
true, //original_size
0.1f // min_W
) { }
BGKLVOctoMap::BGKLVOctoMap(float resolution,
unsigned short block_depth,
float sf2,
float ell,
float free_thresh,
float occupied_thresh,
float var_thresh,
float prior_A,
float prior_B,
bool original_size,
float min_W)
: resolution(resolution), block_depth(block_depth),
block_size((float) pow (2, block_depth - 1) * resolution) {
Block::resolution = resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
Block::index_map = init_index_map(Block::key_loc_map, block_depth);
OcTree::max_depth = block_depth;
OcTreeNode::sf2 = sf2;
OcTreeNode::ell = ell;
OcTreeNode::free_thresh = free_thresh;
OcTreeNode::occupied_thresh = occupied_thresh;
OcTreeNode::var_thresh = var_thresh;
OcTreeNode::prior_A = prior_A;
OcTreeNode::prior_B = prior_B;
OcTreeNode::original_size = original_size;
OcTreeNode::min_W = min_W;
}
BGKLVOctoMap::~BGKLVOctoMap() {
for (auto it = block_arr.begin(); it != block_arr.end(); ++it) {
if (it->second != nullptr) {
delete it->second;
}
}
}
void BGKLVOctoMap::set_resolution(float resolution) {
this->resolution = resolution;
Block::resolution = resolution;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKLVOctoMap::set_block_depth(unsigned short max_depth) {
this->block_depth = max_depth;
OcTree::max_depth = max_depth;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKLVOctoMap::insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res, float max_range) {
#ifdef DEBUG
Debug_Msg("Insert pointcloud: " << "cloud size: " << cloud.size() << " origin: " << origin);
#endif
////////// Preparation //////////////////////////
/////////////////////////////////////////////////
GPLineCloud xy;
GPLineCloud rays;
vector<int> ray_idx;
if(ds_resolution > resolution){
ds_resolution = resolution;
}
get_training_data(cloud, origin, ds_resolution, free_res, max_range, xy, rays, ray_idx);
assert (ray_idx.size() == xy.size());
#ifdef DEBUG
Debug_Msg("Training data size: " << xy.size());
#endif
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
//define all blocks from point cloud input
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
//insert training data into rtree
for (int k = 0; k < xy.size(); ++k) {
float p[] = {xy[k].first.x0(), xy[k].first.y0(), xy[k].first.z0()};
rtree.Insert(p, p, k);
}
/////////////////////////////////////////////////
////////// Training & Prediction ////////////////
/////////////////////////////////////////////////
//define set of blocks that will be predicted
vector<BlockHashKey> test_blocks;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
//create key for each block from point cloud, begin loop to process each block
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
#ifdef OPENMP
#pragma omp critical
#endif
{
//run in parallel, add block to block_arr if it doesn't already exist (block_arr is maintained)
if (block_arr.find(key) == block_arr.end())
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
Block *block = block_arr[key];
bool Block_has_info = false;
//half the region of influence
point3f half_size(OcTreeNode::ell, OcTreeNode::ell, OcTreeNode::ell);
//process each node within a block
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
float block_size = block->get_size(leaf_it);
//skip larger blocks than base resolution
if (block_size > Block::resolution)
continue;
point3f p = block->get_loc(leaf_it);
point3f lim_min = p - half_size;
point3f lim_max = p + half_size;
if(!has_gp_points_in_bbox(lim_min,lim_max))
continue;
//find data for each node individually, xy_idx is raw data
vector<int> xy_idx;
get_gp_points_in_bbox(lim_min, lim_max, xy_idx);
if(xy_idx.size() < 1)
continue;
vector<int> ray_keys(rays.size(), 0); //rays.size number of 0's
vector<float> block_x, block_y;
#ifdef OPENMP
#pragma omp critical
#endif
{
//run in parallel, define data that exists in node influence as hits or rays
for (int j = 0; j < xy_idx.size(); ++j) {
if (ray_idx[xy_idx[j]] == -1) {
block_x.push_back(xy[xy_idx[j]].first.x0());
block_x.push_back(xy[xy_idx[j]].first.y0());
block_x.push_back(xy[xy_idx[j]].first.z0());
block_x.push_back(xy[xy_idx[j]].first.x0());
block_x.push_back(xy[xy_idx[j]].first.y0());
block_x.push_back(xy[xy_idx[j]].first.z0());
block_y.push_back(1.0f);
}
else if (ray_keys[ray_idx[xy_idx[j]]] == 0) {
ray_keys[ray_idx[xy_idx[j]]] = 1;
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.x0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.y0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.z0());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.x1());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.y1());
block_x.push_back(rays[ray_idx[xy_idx[j]]].first.z1());
block_y.push_back(0.0f);
}
}
};
//push training data into node (legacy code, used to push into block)
BGKLV3f *bgklv = new BGKLV3f(OcTreeNode::sf2, OcTreeNode::ell);
bgklv->train(block_x, block_y);
#ifdef DEBUG
Debug_Msg("Training done");
Debug_Msg("Prediction: block number: " << bgklv_arr.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
vector<float> xs;
vector<float> ybar, kbar;
//p was defined as the current node earlier
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
//use training data in bgklv to predict ybar and kbar at xs
bgklv->predict(xs, ybar, kbar);
//update active node with predictions
OcTreeNode &node = leaf_it.get_node();
if (kbar[0] > 0.001f){
node.update(ybar[0], kbar[0]);
}
Block_has_info = true;
#ifdef DEBUG
Debug_Msg("Prediction done");
#endif
}
#ifdef OPENMP
#pragma omp critical
#endif
{
//run in parallel, after block iteration ends check whether to add to list of blocks that were updated
if(Block_has_info){
test_blocks.push_back(key);
}
};
}
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
///////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for
#endif
//only use updated blocks
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
if (OcTreeNode::original_size)
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
//only need to remove raw data from the rtree
rtree.RemoveAll();
}
void BGKLVOctoMap::get_bbox(point3f &lim_min, point3f &lim_max) const {
lim_min = point3f(0, 0, 0);
lim_max = point3f(0, 0, 0);
GPLineCloud centers;
for (auto it = block_arr.cbegin(); it != block_arr.cend(); ++it) {
centers.emplace_back(point6f(it->second->get_center()), 1);
}
if (centers.size() > 0) {
bbox(centers, lim_min, lim_max);
lim_min -= point3f(block_size, block_size, block_size) * 0.5;
lim_max += point3f(block_size, block_size, block_size) * 0.5;
}
}
//method to build training dataset from raw pointcloud data
void BGKLVOctoMap::get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPLineCloud &xy, GPLineCloud &rays, vector<int> &ray_idx) const {
//downsample all incoming data
PCLPointCloud sampled_hits;
downsample(cloud, sampled_hits, ds_resolution);
rays.clear();
ray_idx.clear();
xy.clear();
int idx = 0;
double offset = OcTreeNode::ell*pow(2,0.5);
double influence = OcTreeNode::ell;
for (auto it = sampled_hits.begin(); it != sampled_hits.end(); ++it) {
point3f p(it->x, it->y, it->z);
double l = (p - origin).norm();
float nx = (p.x() - origin.x()) / l;
float ny = (p.y() - origin.y()) / l;
float nz = (p.z() - origin.z()) / l;
//filter out points too far away, but keep rays up to max_range
if (max_range > 0) {
if (l < max_range){
l = (float) sqrt((p.x() - origin.x()) * (p.x() - origin.x()) + (p.y() - origin.y()) * (p.y() - origin.y()) + (p.z() - origin.z()) * (p.z() - origin.z()));
l = l-offset;
xy.emplace_back(point6f(p), 1.0f);
ray_idx.push_back(-1);
}
else{
// continue; //use continue to skip rays up to max_range
l = max_range-offset;
}
}
point3f nearest_point = p;
point3f free_endpt(origin.x() + nx * l, origin.y() + ny * l, origin.z() + nz * l);
//find points "near" the ray
PointCloud nearby_points;
for (auto iter = sampled_hits.begin(); iter != sampled_hits.end(); ++iter) {
point3f p0(iter->x, iter->y, iter->z);
//filter out points too far away
if (max_range > 0) {
double range = (p0 - origin).norm();
if (range > max_range)
continue;
}
//include free space near the floor (by removing floor points from nearby, currently using x-y plane as floor)
if(p.z() > (offset+origin.z()) && p0.z() < origin.z()+influence){
continue;
}
double dist1 = (free_endpt-p0).norm();
double dist2 = (origin-p0).norm();
//check if endpt is within influence of ray
if(dist1 < influence){
nearby_points.emplace_back(p0);
}
else if(dist1 < l && dist2 < l){
nearby_points.emplace_back(p0);
}
}
//search through nearby points to reduce ray as necessary
point3f line_vec = free_endpt-origin;
for (auto p1 = nearby_points.begin(); p1 != nearby_points.end(); p1++){
double dist;
point3f pnt_vec = *p1 - origin;
double b = pnt_vec.dot(line_vec);
if(b > pow(l,2)){
continue;
}
else{
point3f nearest = origin + line_vec*(b/pow(line_vec.norm(),2));
dist = (*p1-nearest).norm();
}
if(dist < influence){
nearest_point = *p1;
l = b/line_vec.norm();
}
}
//remove downward rays close to sensor
if(l < max_range/5.0 && l/(offset-nearest_point.z()) > 0){
continue;
}
free_endpt = point3f(origin.x() + nx * l, origin.y() + ny * l, origin.z() + nz * l);
point3f free_origin = origin;
//move free ray origin away from robot
double mu = 1.0;
if(l > influence*mu){
free_origin = point3f(origin.x() + nx * influence*mu, origin.y() + ny * influence*mu, origin.z() + nz * influence*mu);
}
else{
free_origin = free_endpt;
}
PointCloud frees;
beam_sample(free_endpt, free_origin, frees, free_resolution);
xy.emplace_back(point6f(free_origin.x(), free_origin.y(), free_origin.z()), 0.0f);
ray_idx.push_back(idx);
//plaxeholder points along the ray used to check if a ray is near a cell -> yes means use this ray
for (auto p = frees.begin(); p != frees.end(); ++p) {
xy.emplace_back(point6f(p->x(), p->y(), p->z()), 0.0f);
ray_idx.push_back(idx);
}
point6f line6f(free_origin, free_endpt);
rays.emplace_back(line6f, 0.0f);
++idx;
}
}
void BGKLVOctoMap::downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const {
if (ds_resolution < 0) {
out = in;
return;
}
PCLPointCloud::Ptr pcl_in(new PCLPointCloud(in));
pcl::VoxelGrid<PCLPointType> sor;
sor.setInputCloud(pcl_in);
sor.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
sor.filter(out);
}
void BGKLVOctoMap::beam_sample(const point3f &hit, const point3f &origin, PointCloud &frees,
float free_resolution) const {
frees.clear();
float x0 = origin.x();
float y0 = origin.y();
float z0 = origin.z();
float x = hit.x();
float y = hit.y();
float z = hit.z();
float l = (float) sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0) + (z - z0) * (z - z0));
float nx = (x - x0) / l;
float ny = (y - y0) / l;
float nz = (z - z0) / l;
float d = l;
while (d > 0.0) {
frees.emplace_back(x0 + nx * d, y0 + ny * d, z0 + nz * d);
d -= free_resolution;
}
}
void BGKLVOctoMap::bbox(const GPLineCloud &cloud, point3f &lim_min, point3f &lim_max) const {
vector<float> x, y, z;
for (auto it = cloud.cbegin(); it != cloud.cend(); ++it) {
x.push_back(it->first.x0());
x.push_back(it->first.x1());
y.push_back(it->first.y0());
y.push_back(it->first.y1());
z.push_back(it->first.z0());
z.push_back(it->first.z1());
}
auto xlim = std::minmax_element(x.cbegin(), x.cend());
auto ylim = std::minmax_element(y.cbegin(), y.cend());
auto zlim = std::minmax_element(z.cbegin(), z.cend());
lim_min.x() = *xlim.first;
lim_min.y() = *ylim.first;
lim_min.z() = *zlim.first;
lim_max.x() = *xlim.second;
lim_max.y() = *ylim.second;
lim_max.z() = *zlim.second;
}
void BGKLVOctoMap::get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<BlockHashKey> &blocks) const {
for (float x = lim_min.x() - block_size; x <= lim_max.x() + 2 * block_size; x += block_size) {
for (float y = lim_min.y() - block_size; y <= lim_max.y() + 2 * block_size; y += block_size) {
for (float z = lim_min.z() - block_size; z <= lim_max.z() + 2 * block_size; z += block_size) {
blocks.push_back(block_to_hash_key(x, y, z));
}
}
}
}
int BGKLVOctoMap::get_gp_points_in_bbox(const BlockHashKey &key,
vector<int> &out) {
point3f half_size(OcTreeNode::ell, OcTreeNode::ell, OcTreeNode::ell);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return get_gp_points_in_bbox(lim_min, lim_max, out);
}
int BGKLVOctoMap::has_gp_points_in_bbox(const BlockHashKey &key) {
point3f half_size(OcTreeNode::ell, OcTreeNode::ell, OcTreeNode::ell);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return has_gp_points_in_bbox(lim_min, lim_max);
}
int BGKLVOctoMap::get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<int> &out) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKLVOctoMap::search_callback, static_cast<void *>(&out));
}
int BGKLVOctoMap::has_gp_points_in_bbox(const point3f &lim_min,
const point3f &lim_max) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKLVOctoMap::count_callback, NULL);
}
bool BGKLVOctoMap::count_callback(int k, void *arg) {
return false;
}
bool BGKLVOctoMap::search_callback(int k, void *arg) {
vector<int> *out = static_cast<vector<int> *>(arg);
out->push_back(k);
return true;
}
int BGKLVOctoMap::has_gp_points_in_bbox(const ExtendedBlock &block) {
for (auto it = block.cbegin(); it != block.cend(); ++it) {
if (has_gp_points_in_bbox(*it) > 0)
return 1;
}
return 0;
}
int BGKLVOctoMap::get_gp_points_in_bbox(const ExtendedBlock &block,
vector<int> &out) {
int n = 0;
for (auto it = block.cbegin(); it != block.cend(); ++it) {
n += get_gp_points_in_bbox(*it, out);
}
return n;
}
Block *BGKLVOctoMap::search(BlockHashKey key) const {
auto block = block_arr.find(key);
if (block == block_arr.end()) {
return nullptr;
} else {
return block->second;
}
}
OcTreeNode BGKLVOctoMap::search(point3f p) const {
Block *block = search(block_to_hash_key(p));
if (block == nullptr) {
return OcTreeNode();
} else {
return OcTreeNode(block->search(p));
}
}
OcTreeNode BGKLVOctoMap::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
}
| 21,314 | 35.877163 | 174 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvoctomap_server.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include <pcl_ros/transforms.h>
#include <pcl/filters/voxel_grid.h>
#include "markerarray_pub.h"
#include "bgklvoctomap.h"
tf::TransformListener *listener;
std::string frame_id("/map");
la3dm::BGKLVOctoMap *map;
la3dm::MarkerArrayPub *m_pub_occ, *m_pub_free;
tf::Vector3 last_position;
tf::Quaternion last_orientation;
bool first = true;
double position_change_thresh = 0.1;
double orientation_change_thresh = 0.2;
bool updated = false;
//Universal parameters
std::string map_topic_occ("/occupied_cells_vis_array");
std::string map_topic_free("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 0.1;
double ell = 0.2;
double free_resolution = 0.1;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = true;
//BGKLV parameters
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
float min_W = 0.1f;
void cloudHandler(const sensor_msgs::PointCloud2ConstPtr &cloud) {
tf::StampedTransform transform;
try {
listener->waitForTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, ros::Duration(5.0));
listener->lookupTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, transform); //ros::Time::now() -- Don't use this because processing time delay breaks it
} catch (tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
return;
}
ros::Time start = ros::Time::now();
la3dm::point3f origin;
tf::Vector3 translation = transform.getOrigin();
tf::Quaternion orientation = transform.getRotation();
if (first || orientation.angleShortestPath(last_orientation) > orientation_change_thresh || translation.distance(last_position) > position_change_thresh)
{
ROS_INFO_STREAM("Cloud received");
last_position = translation;
last_orientation = orientation;
origin.x() = (float) translation.x();
origin.y() = (float) translation.y();
origin.z() = (float) translation.z();
sensor_msgs::PointCloud2 cloud_map;
pcl_ros::transformPointCloud(frame_id, *cloud, cloud_map, *listener);
la3dm::PCLPointCloud::Ptr pcl_cloud (new la3dm::PCLPointCloud());
pcl::fromROSMsg(cloud_map, *pcl_cloud);
if(pcl_cloud->size() > 5){
map->insert_pointcloud(*pcl_cloud, origin, (float) ds_resolution, (float) free_resolution, (float) max_range);
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("One cloud finished in " << (end - start).toSec() << "s");
updated = true;
}
if (updated)
{
ros::Time start2 = ros::Time::now();
m_pub_occ->clear();
m_pub_free->clear();
for (auto it = map->begin_leaf(); it != map->end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size)
{
m_pub_occ->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_occ->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution());
}
}
}
else if(it.get_node().get_state() == la3dm::State::FREE)
{
if (original_size)
{
m_pub_free->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_free->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution(), it.get_node().get_prob());
}
}
}
}
updated = false;
m_pub_free->publish();
m_pub_occ->publish();
ros::Time end2 = ros::Time::now();
ROS_INFO_STREAM("One map published in " << (end2 - start2).toSec() << "s");
}
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgklvoctomap_server");
ros::NodeHandle nh("~");
//incoming pointcloud topic, this could be put into the .yaml too
std::string cloud_topic("/velodyne_points");
//Universal parameters
nh.param<std::string>("topic", map_topic_occ, map_topic_occ);
nh.param<std::string>("topic_free", map_topic_free, map_topic_free);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
//BKGLV parameters
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
nh.param<float>("min_W", min_W, min_W);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"topic: " << map_topic_occ << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B << std::endl <<
"min_W: " << min_W
);
map = new la3dm::BGKLVOctoMap(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B, original_size, min_W);
ros::Subscriber point_sub = nh.subscribe<sensor_msgs::PointCloud2>(cloud_topic, 1, cloudHandler);
m_pub_occ = new la3dm::MarkerArrayPub(nh, map_topic_occ, resolution);
m_pub_free = new la3dm::MarkerArrayPub(nh, map_topic_free, resolution);
listener = new tf::TransformListener();
while(ros::ok())
{
ros::spin();
}
return 0;
}
| 7,312 | 35.383085 | 177 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvoctomap_static_node.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include "bgklvoctomap.h"
#include "markerarray_pub.h"
void load_pcd(std::string filename, la3dm::point3f &origin, la3dm::PCLPointCloud &cloud) {
pcl::PCLPointCloud2 cloud2;
Eigen::Vector4f _origin;
Eigen::Quaternionf orientaion;
pcl::io::loadPCDFile(filename, cloud2, _origin, orientaion);
pcl::fromPCLPointCloud2(cloud2, cloud);
ROS_INFO_STREAM("Pointcloud is of size: " << cloud.size());
origin.x() = _origin[0];
origin.y() = _origin[1];
origin.z() = _origin[2];
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgklvoctomap_static_node");
ros::NodeHandle nh("~");
std::string dir;
std::string prefix;
int scan_num = 0;
std::string map_topic("/occupied_cells_vis_array");
std::string map_topic2("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 1.0;
double ell = 1.0;
double free_resolution = 0.5;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = false;
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
float min_W = 0.1f;
nh.param<std::string>("dir", dir, dir);
nh.param<std::string>("prefix", prefix, prefix);
nh.param<std::string>("topic", map_topic, map_topic);
nh.param<std::string>("topic2", map_topic2, map_topic2);
nh.param<int>("scan_num", scan_num, scan_num);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
nh.param<float>("min_W", min_W, min_W);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"dir: " << dir << std::endl <<
"prefix: " << prefix << std::endl <<
"topic: " << map_topic << std::endl <<
"scan_sum: " << scan_num << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B << std::endl <<
"min_W: " << min_W
);
la3dm::BGKLVOctoMap map(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B, original_size, min_W);
ros::Time start = ros::Time::now();
for (int scan_id = 1; scan_id <= scan_num; ++scan_id) {
la3dm::PCLPointCloud cloud;
la3dm::point3f origin;
std::string filename(dir + "/" + prefix + "_" + std::to_string(scan_id) + ".pcd");
load_pcd(filename, origin, cloud);
ROS_INFO_STREAM("Scan " << scan_id << " loaded");
map.insert_pointcloud(cloud, origin, resolution, free_resolution, max_range);
ROS_INFO_STREAM("Scan " << scan_id << " done");
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("Mapping finished in " << (end - start).toSec() << "s");
///////// Publish Map /////////////////////
la3dm::MarkerArrayPub m_pub(nh, map_topic, resolution);
la3dm::MarkerArrayPub m_pub2(nh, map_topic2, resolution);
if (min_z == max_z) {
la3dm::point3f lim_min, lim_max;
map.get_bbox(lim_min, lim_max);
min_z = lim_min.z();
max_z = lim_max.z();
}
for (auto it = map.begin_leaf(); it != map.end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if(p.z() > 2.0)
continue;
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size) {
m_pub.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
}
else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution());
}
}
else if (it.get_node().get_state() == la3dm::State::FREE) {
if (original_size) {
m_pub2.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub2.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution(), it.get_node().get_prob());
}
}
}
m_pub.publish();
m_pub2.publish();
ros::spin();
return 0;
}
| 5,932 | 38.291391 | 145 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvoctree.cpp | #include "bgklvoctree.h"
#include <cmath>
namespace la3dm {
unsigned short OcTree::max_depth = 0;
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned long index) {
return (depth << 28) + index;
}
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned long &index) {
depth = (unsigned short) (key >> 28);
index = (unsigned long) (key & 0xFFFFFFF);
}
OcTree::OcTree() {
if (max_depth <= 0)
node_arr = nullptr;
else {
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
node_arr[i] = new OcTreeNode[(int) pow(8, i)]();
}
}
}
OcTree::~OcTree() {
if (node_arr != nullptr) {
for (unsigned short i = 0; i < max_depth; ++i) {
if (node_arr[i] != nullptr) {
delete[] node_arr[i];
}
}
delete[] node_arr;
}
}
OcTree::OcTree(const OcTree &other) {
if (other.node_arr == nullptr) {
node_arr = nullptr;
return;
}
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (other.node_arr[i] != nullptr) {
int n = (int) pow(8, i);
node_arr[i] = new OcTreeNode[n]();
std::copy(node_arr[i], node_arr[i] + n, other.node_arr[i]);
} else
node_arr[i] = nullptr;
}
}
OcTree &OcTree::operator=(const OcTree &other) {
OcTreeNode **local_node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (local_node_arr[i] != nullptr) {
int n = (int) pow(8, i);
local_node_arr[i] = new OcTreeNode[n]();
std::copy(local_node_arr[i], local_node_arr[i] + n, other.node_arr[i]);
} else
local_node_arr[i] = nullptr;
}
node_arr = local_node_arr;
return *this;
}
bool OcTree::is_leaf(unsigned short depth, unsigned long index) const {
if (node_arr != nullptr && node_arr[depth] != nullptr && node_arr[depth][index].get_state() != State::PRUNED) {
if (depth + 1 < max_depth) {
if (node_arr[depth + 1] == nullptr || node_arr[depth + 1][index * 8].get_state() == State::PRUNED)
return true;
} else {
return true;
}
}
return false;
}
bool OcTree::is_leaf(OcTreeHashKey key) const {
unsigned short depth = 0;
unsigned long index = 0;
hash_key_to_node(key, depth, index);
return is_leaf(depth, index);
}
bool OcTree::search(OcTreeHashKey key) const {
unsigned short depth;
unsigned long index;
hash_key_to_node(key, depth, index);
return node_arr != nullptr &&
node_arr[depth] != nullptr &&
node_arr[depth][index].get_state() != State::PRUNED;
}
bool OcTree::prune() {
if (node_arr == nullptr)
return false;
bool pruned = false;
for (unsigned short depth = max_depth - 1; depth > 0; --depth) {
OcTreeNode *layer = node_arr[depth];
OcTreeNode *parent_layer = node_arr[depth - 1];
if (layer == nullptr)
continue;
bool empty_layer = true;
unsigned int n = (unsigned int) pow(8, depth);
for (unsigned long index = 0; index < n; index += 8) {
State state = layer[index].get_state();
if (state == State::UNKNOWN) {
empty_layer = false;
continue;
}
if (state == State::PRUNED)
continue;
bool collapsible = true;
for (unsigned short i = 1; i < 8; ++i) {
if (layer[index + i].get_state() != state) {
collapsible = false;
continue;
}
}
if (collapsible) {
parent_layer[(int) floor(index / 8)] = layer[index];
for (unsigned short i = 0; i < 8; ++i) {
layer[index + i].prune();
}
pruned = true;
} else {
empty_layer = false;
}
}
if (empty_layer) {
delete[] layer;
node_arr[depth] = nullptr;
}
}
return pruned;
}
OcTreeNode &OcTree::operator[](OcTreeHashKey key) const {
unsigned short depth;
unsigned long index;
hash_key_to_node(key, depth, index);
return node_arr[depth][index];
}
} | 4,951 | 30.74359 | 119 | cpp |
la3dm | la3dm-master/src/bgklvoctomap/bgklvoctree_node.cpp | #include "bgklvoctree_node.h"
#include <cmath>
namespace la3dm {
/// Default static values
float Occupancy::sf2 = 1.0f;
float Occupancy::ell = 1.0f;
float Occupancy::free_thresh = 0.3f;
float Occupancy::occupied_thresh = 0.7f;
float Occupancy::var_thresh = 1000.0f;
float Occupancy::prior_A = 0.5f;
float Occupancy::prior_B = 0.5f;
bool Occupancy::original_size = true;
float Occupancy::min_W = 0.1f;
Occupancy::Occupancy(float A, float B) : m_A(Occupancy::prior_A + A), m_B(Occupancy::prior_B + B) {
classified = false;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNCERTAIN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
float Occupancy::get_prob() const {
float prob, W;
if (m_A + m_B < Occupancy::min_W){
W = Occupancy::min_W;
}
else{
W = m_A + m_B;
}
if(m_A > m_B){
prob = m_A / (W-m_B) + (W-m_A-m_B)*0.5 / (W-m_B);
}
else{
prob = 0.5*(W-m_B-m_A) / (W-m_A);
}
return prob;
}
float Occupancy::get_var() const {
float var, W;
float prob = get_prob();
if (m_A + m_B < Occupancy::min_W){
W = Occupancy::min_W;
}
else{
W = m_A + m_B;
}
var = m_A / W * pow(1-prob,2) + (W-m_A-m_B) / W * pow(0.5-prob,2) + m_B / W * pow(prob,2);
return var;
}
void Occupancy::update(float ybar, float kbar) {
classified = true;
m_A += ybar;
m_B += kbar - ybar;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNCERTAIN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc) {
os.write((char *) &oc.m_A, sizeof(oc.m_A));
os.write((char *) &oc.m_B, sizeof(oc.m_B));
return os;
}
std::ifstream &operator>>(std::ifstream &is, Occupancy &oc) {
float m_A, m_B;
is.read((char *) &m_A, sizeof(m_A));
is.read((char *) &m_B, sizeof(m_B));
oc = OcTreeNode(m_A, m_B);
return is;
}
std::ostream &operator<<(std::ostream &os, const Occupancy &oc) {
return os << '(' << oc.m_A << ' ' << oc.m_B << ' ' << oc.get_prob() << ')';
}
} | 2,939 | 29.625 | 117 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkblock.cpp | #include "bgkblock.h"
#include <queue>
#include <algorithm>
namespace la3dm {
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth) {
std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
std::queue<point3f> center_q;
center_q.push(point3f(0.0f, 0.0f, 0.0f));
for (unsigned short depth = 0; depth < max_depth; ++depth) {
unsigned short q_size = (unsigned short) center_q.size();
float half_size = (float) (resolution * pow(2, max_depth - depth - 1) * 0.5f);
for (unsigned short index = 0; index < q_size; ++index) {
point3f center = center_q.front();
center_q.pop();
key_loc_map.emplace(node_to_hash_key(depth, index), center);
if (depth == max_depth - 1)
continue;
for (unsigned short i = 0; i < 8; ++i) {
float x = (float) (center.x() + half_size * (i & 4 ? 0.5 : -0.5));
float y = (float) (center.y() + half_size * (i & 2 ? 0.5 : -0.5));
float z = (float) (center.z() + half_size * (i & 1 ? 0.5 : -0.5));
center_q.emplace(x, y, z);
}
}
}
return key_loc_map;
}
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(
const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map, unsigned short max_depth) {
std::vector<std::pair<OcTreeHashKey, point3f>> temp;
for (auto it = key_loc_map.begin(); it != key_loc_map.end(); ++it) {
unsigned short depth, index;
hash_key_to_node(it->first, depth, index);
if (depth == max_depth - 1)
temp.push_back(std::make_pair(it->first, it->second));
}
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.x() < p2.second.x();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.y() < p2.second.y();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.z() < p2.second.z();
});
std::unordered_map<unsigned short, OcTreeHashKey> index_map;
int index = 0;
for (auto it = temp.cbegin(); it != temp.cend(); ++it, ++index) {
index_map.insert(std::make_pair(index, it->first));
}
return index_map;
};
BlockHashKey block_to_hash_key(point3f center) {
return block_to_hash_key(center.x(), center.y(), center.z());
}
BlockHashKey block_to_hash_key(float x, float y, float z) {
return (int64_t(x / (double) Block::size + 524288.5) << 40) |
(int64_t(y / (double) Block::size + 524288.5) << 20) |
(int64_t(z / (double) Block::size + 524288.5));
}
point3f hash_key_to_block(BlockHashKey key) {
return point3f(((key >> 40) - 524288) * Block::size,
(((key >> 20) & 0xFFFFF) - 524288) * Block::size,
((key & 0xFFFFF) - 524288) * Block::size);
}
ExtendedBlock get_extended_block(BlockHashKey key) {
ExtendedBlock blocks;
point3f center = hash_key_to_block(key);
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = key;
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
float Block::resolution = 0.1f;
float Block::size = 0.8f;
unsigned short Block::cell_num = static_cast<unsigned short>(round(Block::size / Block::resolution));
std::unordered_map<OcTreeHashKey, point3f> Block::key_loc_map;
std::unordered_map<unsigned short, OcTreeHashKey> Block::index_map;
Block::Block() : OcTree(), center(0.0f, 0.0f, 0.0f) { }
Block::Block(point3f center) : OcTree(), center(center) { }
ExtendedBlock Block::get_extended_block() const {
ExtendedBlock blocks;
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = block_to_hash_key(x, y, z);
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
OcTreeHashKey Block::get_node(unsigned short x, unsigned short y, unsigned short z) const {
unsigned short index = x + y * Block::cell_num + z * Block::cell_num * Block::cell_num;
return Block::index_map[index];
}
point3f Block::get_point(unsigned short x, unsigned short y, unsigned short z) const {
return Block::key_loc_map[get_node(x, y, z)] + center;
}
void Block::get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const {
int xx = static_cast<int>((p.x() - center.x()) / resolution + Block::cell_num / 2);
int yy = static_cast<int>((p.y() - center.y()) / resolution + Block::cell_num / 2);
int zz = static_cast<int>((p.z() - center.z()) / resolution + Block::cell_num / 2);
auto clip = [](int a) -> int { return std::max(0, std::min(a, Block::cell_num - 1)); };
x = static_cast<unsigned short>(clip(xx));
y = static_cast<unsigned short>(clip(yy));
z = static_cast<unsigned short>(clip(zz));
}
OcTreeNode& Block::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
OcTreeNode& Block::search(point3f p) const {
unsigned short x, y, z;
get_index(p, x, y, z);
return operator[](get_node(x, y, z));
}
} | 6,730 | 41.06875 | 109 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkoctomap.cpp | #include <algorithm>
#include <pcl/filters/voxel_grid.h>
#include "bgkoctomap.h"
#include "bgkinference.h"
using std::vector;
// #define DEBUG true;
#ifdef DEBUG
#include <iostream>
#define Debug_Msg(msg) {\
std::cout << "Debug: " << msg << std::endl; }
#endif
namespace la3dm {
BGKOctoMap::BGKOctoMap() : BGKOctoMap(0.1f, // resolution
4, // block_depth
1.0, // sf2
1.0, // ell
0.3f, // free_thresh
0.7f, // occupied_thresh
1.0f, // var_thresh
1.0f, // prior_A
1.0f // prior_B
) { }
BGKOctoMap::BGKOctoMap(float resolution,
unsigned short block_depth,
float sf2,
float ell,
float free_thresh,
float occupied_thresh,
float var_thresh,
float prior_A,
float prior_B)
: resolution(resolution), block_depth(block_depth),
block_size((float) pow(2, block_depth - 1) * resolution) {
Block::resolution = resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
Block::index_map = init_index_map(Block::key_loc_map, block_depth);
OcTree::max_depth = block_depth;
OcTreeNode::sf2 = sf2;
OcTreeNode::ell = ell;
OcTreeNode::free_thresh = free_thresh;
OcTreeNode::occupied_thresh = occupied_thresh;
OcTreeNode::var_thresh = var_thresh;
OcTreeNode::prior_A = prior_A;
OcTreeNode::prior_B = prior_B;
}
BGKOctoMap::~BGKOctoMap() {
for (auto it = block_arr.begin(); it != block_arr.end(); ++it) {
if (it->second != nullptr) {
delete it->second;
}
}
}
void BGKOctoMap::set_resolution(float resolution) {
this->resolution = resolution;
Block::resolution = resolution;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKOctoMap::set_block_depth(unsigned short max_depth) {
this->block_depth = max_depth;
OcTree::max_depth = max_depth;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void BGKOctoMap::insert_training_data(const GPPointCloud &xy) {
if (xy.empty())
return;
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
for (auto it = xy.cbegin(); it != xy.cend(); ++it) {
float p[] = {it->first.x(), it->first.y(), it->first.z()};
rtree.Insert(p, p, const_cast<GPPointType *>(&*it));
}
/////////////////////////////////////////////////
////////// Training /////////////////////////////
/////////////////////////////////////////////////
vector<BlockHashKey> test_blocks;
std::unordered_map<BlockHashKey, BGK3f *> bgk_arr;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
ExtendedBlock eblock = get_extended_block(key);
if (has_gp_points_in_bbox(eblock))
#ifdef OPENMP
#pragma omp critical
#endif
{
test_blocks.push_back(key);
};
GPPointCloud block_xy;
get_gp_points_in_bbox(key, block_xy);
if (block_xy.size() < 1)
continue;
vector<float> block_x, block_y;
for (auto it = block_xy.cbegin(); it != block_xy.cend(); ++it) {
block_x.push_back(it->first.x());
block_x.push_back(it->first.y());
block_x.push_back(it->first.z());
block_y.push_back(it->second);
}
BGK3f *bgk = new BGK3f(OcTreeNode::sf2, OcTreeNode::ell);
bgk->train(block_x, block_y);
#ifdef OPENMP
#pragma omp critical
#endif
{
bgk_arr.emplace(key, bgk);
};
}
#ifdef DEBUG
Debug_Msg("Training done");
Debug_Msg("Prediction: block number: " << test_blocks.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
Block *block;
#ifdef OPENMP
#pragma omp critical
#endif
{
block = search(key);
if (block == nullptr)
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
vector<float> xs;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
point3f p = block->get_loc(leaf_it);
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
}
ExtendedBlock eblock = block->get_extended_block();
for (auto block_it = eblock.cbegin(); block_it != eblock.cend(); ++block_it) {
auto bgk = bgk_arr.find(*block_it);
if (bgk == bgk_arr.end())
continue;
vector<float> m, var;
bgk->second->predict(xs, m, var);
int j = 0;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it, ++j) {
OcTreeNode &node = leaf_it.get_node();
node.update(m[j], var[j]);
}
}
}
#ifdef DEBUG
Debug_Msg("Prediction done");
#endif
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
for (auto it = bgk_arr.begin(); it != bgk_arr.end(); ++it)
delete it->second;
rtree.RemoveAll();
}
void BGKOctoMap::insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res, float max_range) {
#ifdef DEBUG
Debug_Msg("Insert pointcloud: " << "cloud size: " << cloud.size() << " origin: " << origin);
#endif
////////// Preparation //////////////////////////
/////////////////////////////////////////////////
GPPointCloud xy;
get_training_data(cloud, origin, ds_resolution, free_res, max_range, xy);
#ifdef DEBUG
Debug_Msg("Training data size: " << xy.size());
#endif
// If pointcloud after max_range filtering is empty
// no need to do anything
if (xy.size() == 0) {
return;
}
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
for (auto it = xy.cbegin(); it != xy.cend(); ++it) {
float p[] = {it->first.x(), it->first.y(), it->first.z()};
rtree.Insert(p, p, const_cast<GPPointType *>(&*it));
}
/////////////////////////////////////////////////
////////// Training /////////////////////////////
/////////////////////////////////////////////////
vector<BlockHashKey> test_blocks;
std::unordered_map<BlockHashKey, BGK3f *> bgk_arr;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
ExtendedBlock eblock = get_extended_block(key);
if (has_gp_points_in_bbox(eblock))
#ifdef OPENMP
#pragma omp critical
#endif
{
test_blocks.push_back(key);
};
GPPointCloud block_xy;
get_gp_points_in_bbox(key, block_xy);
if (block_xy.size() < 1)
continue;
vector<float> block_x, block_y;
for (auto it = block_xy.cbegin(); it != block_xy.cend(); ++it) {
block_x.push_back(it->first.x());
block_x.push_back(it->first.y());
block_x.push_back(it->first.z());
block_y.push_back(it->second);
}
BGK3f *bgk = new BGK3f(OcTreeNode::sf2, OcTreeNode::ell);
bgk->train(block_x, block_y);
#ifdef OPENMP
#pragma omp critical
#endif
{
bgk_arr.emplace(key, bgk);
};
}
#ifdef DEBUG
Debug_Msg("Training done");
Debug_Msg("Prediction: block number: " << test_blocks.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
#ifdef OPENMP
#pragma omp critical
#endif
{
if (block_arr.find(key) == block_arr.end())
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
Block *block = block_arr[key];
vector<float> xs;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
point3f p = block->get_loc(leaf_it);
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
}
ExtendedBlock eblock = block->get_extended_block();
for (auto block_it = eblock.cbegin(); block_it != eblock.cend(); ++block_it) {
auto bgk = bgk_arr.find(*block_it);
if (bgk == bgk_arr.end())
continue;
vector<float> ybar, kbar;
bgk->second->predict(xs, ybar, kbar);
int j = 0;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it, ++j) {
OcTreeNode &node = leaf_it.get_node();
auto node_loc = block->get_loc(leaf_it);
if (node_loc.x() == 7.45 && node_loc.y() == 10.15 && node_loc.z() == 1.15) {
std::cout << "updating the node " << ybar[j] << " " << kbar[j] << std::endl;
}
// Only need to update if kernel density total kernel density est > 0
if (kbar[j] > 0.0)
node.update(ybar[j], kbar[j]);
}
}
}
#ifdef DEBUG
Debug_Msg("Prediction done");
#endif
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
for (auto it = bgk_arr.begin(); it != bgk_arr.end(); ++it)
delete it->second;
rtree.RemoveAll();
}
void BGKOctoMap::get_bbox(point3f &lim_min, point3f &lim_max) const {
lim_min = point3f(0, 0, 0);
lim_max = point3f(0, 0, 0);
GPPointCloud centers;
for (auto it = block_arr.cbegin(); it != block_arr.cend(); ++it) {
centers.emplace_back(it->second->get_center(), 1);
}
if (centers.size() > 0) {
bbox(centers, lim_min, lim_max);
lim_min -= point3f(block_size, block_size, block_size) * 0.5;
lim_max += point3f(block_size, block_size, block_size) * 0.5;
}
}
void BGKOctoMap::get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPPointCloud &xy) const {
PCLPointCloud sampled_hits;
downsample(cloud, sampled_hits, ds_resolution);
PCLPointCloud frees;
frees.height = 1;
frees.width = 0;
xy.clear();
for (auto it = sampled_hits.begin(); it != sampled_hits.end(); ++it) {
point3f p(it->x, it->y, it->z);
if (max_range > 0) {
double l = (p - origin).norm();
if (l > max_range)
continue;
}
xy.emplace_back(p, 1.0f);
PointCloud frees_n;
beam_sample(p, origin, frees_n, free_resolution);
frees.push_back(PCLPointType(origin.x(), origin.y(), origin.z()));
for (auto p = frees_n.begin(); p != frees_n.end(); ++p) {
frees.push_back(PCLPointType(p->x(), p->y(), p->z()));
frees.width++;
}
}
PCLPointCloud sampled_frees;
downsample(frees, sampled_frees, ds_resolution);
for (auto it = sampled_frees.begin(); it != sampled_frees.end(); ++it) {
xy.emplace_back(point3f(it->x, it->y, it->z), 0.0f);
}
}
void BGKOctoMap::downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const {
if (ds_resolution < 0) {
out = in;
return;
}
PCLPointCloud::Ptr pcl_in(new PCLPointCloud(in));
pcl::VoxelGrid<PCLPointType> sor;
sor.setInputCloud(pcl_in);
sor.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
sor.filter(out);
}
void BGKOctoMap::beam_sample(const point3f &hit, const point3f &origin, PointCloud &frees,
float free_resolution) const {
frees.clear();
float x0 = origin.x();
float y0 = origin.y();
float z0 = origin.z();
float x = hit.x();
float y = hit.y();
float z = hit.z();
float l = (float) sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0) + (z - z0) * (z - z0));
float nx = (x - x0) / l;
float ny = (y - y0) / l;
float nz = (z - z0) / l;
float d = free_resolution;
while (d < l) {
frees.emplace_back(x0 + nx * d, y0 + ny * d, z0 + nz * d);
d += free_resolution;
}
if (l > free_resolution)
frees.emplace_back(x0 + nx * (l - free_resolution), y0 + ny * (l - free_resolution), z0 + nz * (l - free_resolution));
}
/*
* Compute bounding box of pointcloud
* Precondition: cloud non-empty
*/
void BGKOctoMap::bbox(const GPPointCloud &cloud, point3f &lim_min, point3f &lim_max) const {
assert(cloud.size() > 0);
vector<float> x, y, z;
for (auto it = cloud.cbegin(); it != cloud.cend(); ++it) {
x.push_back(it->first.x());
y.push_back(it->first.y());
z.push_back(it->first.z());
}
auto xlim = std::minmax_element(x.cbegin(), x.cend());
auto ylim = std::minmax_element(y.cbegin(), y.cend());
auto zlim = std::minmax_element(z.cbegin(), z.cend());
lim_min.x() = *xlim.first;
lim_min.y() = *ylim.first;
lim_min.z() = *zlim.first;
lim_max.x() = *xlim.second;
lim_max.y() = *ylim.second;
lim_max.z() = *zlim.second;
}
void BGKOctoMap::get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<BlockHashKey> &blocks) const {
for (float x = lim_min.x() - block_size; x <= lim_max.x() + 2 * block_size; x += block_size) {
for (float y = lim_min.y() - block_size; y <= lim_max.y() + 2 * block_size; y += block_size) {
for (float z = lim_min.z() - block_size; z <= lim_max.z() + 2 * block_size; z += block_size) {
blocks.push_back(block_to_hash_key(x, y, z));
}
}
}
}
int BGKOctoMap::get_gp_points_in_bbox(const BlockHashKey &key,
GPPointCloud &out) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return get_gp_points_in_bbox(lim_min, lim_max, out);
}
int BGKOctoMap::has_gp_points_in_bbox(const BlockHashKey &key) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return has_gp_points_in_bbox(lim_min, lim_max);
}
int BGKOctoMap::get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
GPPointCloud &out) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKOctoMap::search_callback, static_cast<void *>(&out));
}
int BGKOctoMap::has_gp_points_in_bbox(const point3f &lim_min,
const point3f &lim_max) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, BGKOctoMap::count_callback, NULL);
}
bool BGKOctoMap::count_callback(GPPointType *p, void *arg) {
return false;
}
bool BGKOctoMap::search_callback(GPPointType *p, void *arg) {
GPPointCloud *out = static_cast<GPPointCloud *>(arg);
out->push_back(*p);
return true;
}
int BGKOctoMap::has_gp_points_in_bbox(const ExtendedBlock &block) {
for (auto it = block.cbegin(); it != block.cend(); ++it) {
if (has_gp_points_in_bbox(*it) > 0)
return 1;
}
return 0;
}
int BGKOctoMap::get_gp_points_in_bbox(const ExtendedBlock &block,
GPPointCloud &out) {
int n = 0;
for (auto it = block.cbegin(); it != block.cend(); ++it) {
n += get_gp_points_in_bbox(*it, out);
}
return n;
}
Block *BGKOctoMap::search(BlockHashKey key) const {
auto block = block_arr.find(key);
if (block == block_arr.end()) {
return nullptr;
} else {
return block->second;
}
}
OcTreeNode BGKOctoMap::search(point3f p) const {
Block *block = search(block_to_hash_key(p));
if (block == nullptr) {
return OcTreeNode();
} else {
return OcTreeNode(block->search(p));
}
}
OcTreeNode BGKOctoMap::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
} | 20,391 | 34.464348 | 130 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkoctomap_server.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include <pcl_ros/transforms.h>
#include <pcl/filters/voxel_grid.h>
#include "markerarray_pub.h"
#include "bgkoctomap.h"
tf::TransformListener *listener;
std::string frame_id("/map");
la3dm::BGKOctoMap *map;
la3dm::MarkerArrayPub *m_pub_occ, *m_pub_free;
//startup parameters
tf::Vector3 last_position;
tf::Quaternion last_orientation;
bool first = true;
double position_change_thresh = 0.1;
double orientation_change_thresh = 0.2;
bool updated = false;
//Universal parameters
std::string map_topic_occ("/occupied_cells_vis_array");
std::string map_topic_free("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 0.1;
double ell = 0.2;
double free_resolution = 0.65;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = true;
//BGKL parameters
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
void cloudHandler(const sensor_msgs::PointCloud2ConstPtr &cloud) {
tf::StampedTransform transform;
try {
listener->waitForTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, ros::Duration(5.0));
listener->lookupTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, transform); //ros::Time::now() -- Don't use this because processing time delay breaks it
} catch (tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
return;
}
ros::Time start = ros::Time::now();
la3dm::point3f origin;
tf::Vector3 translation = transform.getOrigin();
tf::Quaternion orientation = transform.getRotation();
if (first || orientation.angleShortestPath(last_orientation) > orientation_change_thresh || translation.distance(last_position) > position_change_thresh)
{
ROS_INFO_STREAM("Cloud received");
last_position = translation;
last_orientation = orientation;
origin.x() = (float) translation.x();
origin.y() = (float) translation.y();
origin.z() = (float) translation.z();
sensor_msgs::PointCloud2 cloud_map;
pcl_ros::transformPointCloud(frame_id, *cloud, cloud_map, *listener);
//pointer required for downsampling
la3dm::PCLPointCloud::Ptr pcl_cloud (new la3dm::PCLPointCloud());
pcl::fromROSMsg(cloud_map, *pcl_cloud);
//downsample for faster mapping
la3dm::PCLPointCloud filtered_cloud;
pcl::VoxelGrid<pcl::PointXYZ> filterer;
filterer.setInputCloud(pcl_cloud);
filterer.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
filterer.filter(filtered_cloud);
if(filtered_cloud.size() > 5){
map->insert_pointcloud(filtered_cloud, origin, (float) resolution, (float) free_resolution, (float) max_range);
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("One cloud finished in " << (end - start).toSec() << "s");
updated = true;
}
if (updated)
{
ros::Time start2 = ros::Time::now();
m_pub_occ->clear();
m_pub_free->clear();
for (auto it = map->begin_leaf(); it != map->end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size)
{
m_pub_occ->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_occ->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution());
}
}
}
else if(it.get_node().get_state() == la3dm::State::FREE)
{
if (original_size)
{
m_pub_free->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_free->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution(), it.get_node().get_prob());
}
}
}
}
updated = false;
m_pub_occ->publish();
m_pub_free->publish();
ros::Time end2 = ros::Time::now();
ROS_INFO_STREAM("One map published in " << (end2 - start2).toSec() << "s");
}
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgkoctomap_server");
ros::NodeHandle nh("~");
//incoming pointcloud topic, this could be put into the .yaml too
std::string cloud_topic("/velodyne_points");
//Universal parameters
nh.param<std::string>("topic", map_topic_occ, map_topic_occ);
nh.param<std::string>("topic_free", map_topic_free, map_topic_free);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
//BKGL parameters
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"topic: " << map_topic_occ << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B
);
map = new la3dm::BGKOctoMap(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B);
ros::Subscriber point_sub = nh.subscribe<sensor_msgs::PointCloud2>(cloud_topic, 1, cloudHandler);
m_pub_occ = new la3dm::MarkerArrayPub(nh, map_topic_occ, resolution);
m_pub_free = new la3dm::MarkerArrayPub(nh, map_topic_free, resolution);
listener = new tf::TransformListener();
while(ros::ok())
{
ros::spin();
}
return 0;
}
| 7,546 | 35.283654 | 177 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkoctomap_static_node.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include "bgkoctomap.h"
#include "markerarray_pub.h"
void load_pcd(std::string filename, la3dm::point3f &origin, la3dm::PCLPointCloud &cloud) {
pcl::PCLPointCloud2 cloud2;
Eigen::Vector4f _origin;
Eigen::Quaternionf orientaion;
pcl::io::loadPCDFile(filename, cloud2, _origin, orientaion);
pcl::fromPCLPointCloud2(cloud2, cloud);
origin.x() = _origin[0];
origin.y() = _origin[1];
origin.z() = _origin[2];
}
int main(int argc, char **argv) {
ros::init(argc, argv, "bgkoctomap_static_node");
ros::NodeHandle nh("~");
std::string dir;
std::string prefix;
int scan_num = 0;
std::string map_topic("/occupied_cells_vis_array");
std::string map_topic2("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 1.0;
double ell = 1.0;
double free_resolution = 0.5;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = false;
float var_thresh = 1.0f;
float prior_A = 1.0f;
float prior_B = 1.0f;
nh.param<std::string>("dir", dir, dir);
nh.param<std::string>("prefix", prefix, prefix);
nh.param<std::string>("topic", map_topic, map_topic);
nh.param<std::string>("topic2", map_topic2, map_topic2);
nh.param<int>("scan_num", scan_num, scan_num);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
nh.param<float>("var_thresh", var_thresh, var_thresh);
nh.param<float>("prior_A", prior_A, prior_A);
nh.param<float>("prior_B", prior_B, prior_B);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"dir: " << dir << std::endl <<
"prefix: " << prefix << std::endl <<
"topic: " << map_topic << std::endl <<
"scan_sum: " << scan_num << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size << std::endl <<
"var_thresh: " << var_thresh << std::endl <<
"prior_A: " << prior_A << std::endl <<
"prior_B: " << prior_B
);
la3dm::BGKOctoMap map(resolution, block_depth, sf2, ell, free_thresh, occupied_thresh, var_thresh, prior_A, prior_B);
ros::Time start = ros::Time::now();
for (int scan_id = 1; scan_id <= scan_num; ++scan_id) {
la3dm::PCLPointCloud cloud;
la3dm::point3f origin;
std::string filename(dir + "/" + prefix + "_" + std::to_string(scan_id) + ".pcd");
load_pcd(filename, origin, cloud);
map.insert_pointcloud(cloud, origin, resolution, free_resolution, max_range);
ROS_INFO_STREAM("Scan " << scan_id << " done");
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("Mapping finished in " << (end - start).toSec() << "s");
///////// Publish Map /////////////////////
la3dm::MarkerArrayPub m_pub(nh, map_topic, resolution);
la3dm::MarkerArrayPub m_pub2(nh, map_topic2, resolution);
if (min_z == max_z) {
la3dm::point3f lim_min, lim_max;
map.get_bbox(lim_min, lim_max);
min_z = lim_min.z();
max_z = lim_max.z();
}
for (auto it = map.begin_leaf(); it != map.end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size) {
la3dm::point3f p = it.get_loc();
m_pub.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
} else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution());
}
}
if (it.get_node().get_state() == la3dm::State::FREE) {
if (original_size) {
la3dm::point3f p = it.get_loc();
m_pub2.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub2.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution(), it.get_node().get_prob());
}
}
}
m_pub.publish();
m_pub2.publish();
ros::spin();
return 0;
}
| 5,703 | 38.611111 | 128 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkoctree.cpp | #include "bgkoctree.h"
#include <cmath>
namespace la3dm {
unsigned short OcTree::max_depth = 0;
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned short index) {
return (depth << 16) + index;
}
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned short &index) {
depth = (unsigned short) (key >> 16);
index = (unsigned short) (key & 0xFFFF);
}
OcTree::OcTree() {
if (max_depth <= 0)
node_arr = nullptr;
else {
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
node_arr[i] = new OcTreeNode[(int) pow(8, i)]();
}
}
}
OcTree::~OcTree() {
if (node_arr != nullptr) {
for (unsigned short i = 0; i < max_depth; ++i) {
if (node_arr[i] != nullptr) {
delete[] node_arr[i];
}
}
delete[] node_arr;
}
}
OcTree::OcTree(const OcTree &other) {
if (other.node_arr == nullptr) {
node_arr = nullptr;
return;
}
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (other.node_arr[i] != nullptr) {
int n = (int) pow(8, i);
node_arr[i] = new OcTreeNode[n]();
std::copy(node_arr[i], node_arr[i] + n, other.node_arr[i]);
} else
node_arr[i] = nullptr;
}
}
OcTree &OcTree::operator=(const OcTree &other) {
OcTreeNode **local_node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (local_node_arr[i] != nullptr) {
int n = (int) pow(8, i);
local_node_arr[i] = new OcTreeNode[n]();
std::copy(local_node_arr[i], local_node_arr[i] + n, other.node_arr[i]);
} else
local_node_arr[i] = nullptr;
}
node_arr = local_node_arr;
return *this;
}
bool OcTree::is_leaf(unsigned short depth, unsigned short index) const {
if (node_arr != nullptr && node_arr[depth] != nullptr && node_arr[depth][index].get_state() != State::PRUNED) {
if (depth + 1 < max_depth) {
if (node_arr[depth + 1] == nullptr || node_arr[depth + 1][index * 8].get_state() == State::PRUNED)
return true;
} else {
return true;
}
}
return false;
}
bool OcTree::is_leaf(OcTreeHashKey key) const {
unsigned short depth = 0;
unsigned short index = 0;
hash_key_to_node(key, depth, index);
return is_leaf(depth, index);
}
bool OcTree::search(OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr != nullptr &&
node_arr[depth] != nullptr &&
node_arr[depth][index].get_state() != State::PRUNED;
}
bool OcTree::prune() {
if (node_arr == nullptr)
return false;
bool pruned = false;
for (unsigned short depth = max_depth - 1; depth > 0; --depth) {
OcTreeNode *layer = node_arr[depth];
OcTreeNode *parent_layer = node_arr[depth - 1];
if (layer == nullptr)
continue;
bool empty_layer = true;
unsigned int n = (unsigned int) pow(8, depth);
for (unsigned short index = 0; index < n; index += 8) {
State state = layer[index].get_state();
if (state == State::UNKNOWN) {
empty_layer = false;
continue;
}
if (state == State::PRUNED)
continue;
bool collapsible = true;
for (unsigned short i = 1; i < 8; ++i) {
if (layer[index + i].get_state() != state) {
collapsible = false;
continue;
}
}
if (collapsible) {
parent_layer[(int) floor(index / 8)] = layer[index];
for (unsigned short i = 0; i < 8; ++i) {
layer[index + i].prune();
}
pruned = true;
} else {
empty_layer = false;
}
}
if (empty_layer) {
delete[] layer;
node_arr[depth] = nullptr;
}
}
return pruned;
}
OcTreeNode &OcTree::operator[](OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr[depth][index];
}
} | 4,954 | 30.762821 | 119 | cpp |
la3dm | la3dm-master/src/bgkoctomap/bgkoctree_node.cpp | #include "bgkoctree_node.h"
#include <cmath>
namespace la3dm {
/// Default static values
float Occupancy::sf2 = 1.0f;
float Occupancy::ell = 1.0f;
float Occupancy::free_thresh = 0.3f;
float Occupancy::occupied_thresh = 0.7f;
float Occupancy::var_thresh = 1000.0f;
float Occupancy::prior_A = 0.5f;
float Occupancy::prior_B = 0.5f;
Occupancy::Occupancy(float A, float B) : m_A(Occupancy::prior_A + A), m_B(Occupancy::prior_B + B) {
classified = false;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNKNOWN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
float Occupancy::get_prob() const {
return m_A / (m_A + m_B);
}
void Occupancy::update(float ybar, float kbar) {
classified = true;
m_A += ybar;
m_B += kbar - ybar;
float var = get_var();
if (var > Occupancy::var_thresh)
state = State::UNKNOWN;
else {
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc) {
os.write((char *) &oc.m_A, sizeof(oc.m_A));
os.write((char *) &oc.m_B, sizeof(oc.m_B));
return os;
}
std::ifstream &operator>>(std::ifstream &is, Occupancy &oc) {
float m_A, m_B;
is.read((char *) &m_A, sizeof(m_A));
is.read((char *) &m_B, sizeof(m_B));
oc = OcTreeNode(m_A, m_B);
return is;
}
std::ostream &operator<<(std::ostream &os, const Occupancy &oc) {
return os << '(' << oc.m_A << ' ' << oc.m_B << ' ' << oc.get_prob() << ')';
}
} | 2,122 | 32.698413 | 117 | cpp |
la3dm | la3dm-master/src/common/point3f.cpp | #include "point3f.h"
#include <cassert>
#include <math.h>
#include <string.h>
namespace la3dm {
Vector3 &Vector3::rotate_IP(double roll, double pitch, double yaw) {
double x, y, z;
// pitch (around y)
x = (*this)(0);
z = (*this)(2);
(*this)(0) = (float) (z * sin(pitch) + x * cos(pitch));
(*this)(2) = (float) (z * cos(pitch) - x * sin(pitch));
// yaw (around z)
x = (*this)(0);
y = (*this)(1);
(*this)(0) = (float) (x * cos(yaw) - y * sin(yaw));
(*this)(1) = (float) (x * sin(yaw) + y * cos(yaw));
// roll (around x)
y = (*this)(1);
z = (*this)(2);
(*this)(1) = (float) (y * cos(roll) - z * sin(roll));
(*this)(2) = (float) (y * sin(roll) + z * cos(roll));
return *this;
}
std::istream &Vector3::read(std::istream &s) {
int temp;
s >> temp; // should be 3
for (unsigned int i = 0; i < 3; i++)
s >> operator()(i);
return s;
}
std::ostream &Vector3::write(std::ostream &s) const {
s << 3;
for (unsigned int i = 0; i < 3; i++)
s << " " << operator()(i);
return s;
}
std::istream &Vector3::readBinary(std::istream &s) {
int temp;
s.read((char *) &temp, sizeof(temp));
double val = 0;
for (unsigned int i = 0; i < 3; i++) {
s.read((char *) &val, sizeof(val));
operator()(i) = (float) val;
}
return s;
}
std::ostream &Vector3::writeBinary(std::ostream &s) const {
int temp = 3;
s.write((char *) &temp, sizeof(temp));
double val = 0;
for (unsigned int i = 0; i < 3; i++) {
val = operator()(i);
s.write((char *) &val, sizeof(val));
}
return s;
}
std::ostream &operator<<(std::ostream &out, la3dm::Vector3 const &v) {
return out << '(' << v.x() << ' ' << v.y() << ' ' << v.z() << ')';
}
} | 2,011 | 25.473684 | 74 | cpp |
la3dm | la3dm-master/src/common/point6f.cpp | #include "point6f.h"
#include <cassert>
#include <math.h>
#include <string.h>
namespace la3dm {
// Vector3 &Vector3::rotate_IP(double roll, double pitch, double yaw) {
// double x, y, z;
// // pitch (around y)
// x = (*this)(0);
// z = (*this)(2);
// (*this)(0) = (float) (z * sin(pitch) + x * cos(pitch));
// (*this)(2) = (float) (z * cos(pitch) - x * sin(pitch));
// // yaw (around z)
// x = (*this)(0);
// y = (*this)(1);
// (*this)(0) = (float) (x * cos(yaw) - y * sin(yaw));
// (*this)(1) = (float) (x * sin(yaw) + y * cos(yaw));
// // roll (around x)
// y = (*this)(1);
// z = (*this)(2);
// (*this)(1) = (float) (y * cos(roll) - z * sin(roll));
// (*this)(2) = (float) (y * sin(roll) + z * cos(roll));
// return *this;
// }
std::istream &Vector6::read(std::istream &s) {
int temp;
s >> temp; // should be 6
for (unsigned int i = 0; i < 6; i++)
s >> operator()(i);
return s;
}
std::ostream &Vector6::write(std::ostream &s) const {
s << 6;
for (unsigned int i = 0; i < 6; i++)
s << " " << operator()(i);
return s;
}
std::istream &Vector6::readBinary(std::istream &s) {
int temp;
s.read((char *) &temp, sizeof(temp));
double val = 0;
for (unsigned int i = 0; i < 6; i++) {
s.read((char *) &val, sizeof(val));
operator()(i) = (float) val;
}
return s;
}
std::ostream &Vector6::writeBinary(std::ostream &s) const {
int temp = 6;
s.write((char *) &temp, sizeof(temp));
double val = 0;
for (unsigned int i = 0; i < 6; i++) {
val = operator()(i);
s.write((char *) &val, sizeof(val));
}
return s;
}
std::ostream &operator<<(std::ostream &out, la3dm::Vector6 const &v) {
return out << '(' << v.x0() << ' ' << v.y0() << ' ' << v.z0() << ' ' << v.x1() << ' ' << v.y1() << ' ' << v.z1() << ')';
}
} | 2,122 | 26.934211 | 128 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpblock.cpp | #include "gpblock.h"
#include <queue>
#include <algorithm>
namespace la3dm {
std::unordered_map<OcTreeHashKey, point3f> init_key_loc_map(float resolution, unsigned short max_depth) {
std::unordered_map<OcTreeHashKey, point3f> key_loc_map;
std::queue<point3f> center_q;
center_q.push(point3f(0.0f, 0.0f, 0.0f));
for (unsigned short depth = 0; depth < max_depth; ++depth) {
unsigned short q_size = (unsigned short) center_q.size();
float half_size = (float) (resolution * pow(2, max_depth - depth - 1) * 0.5f);
for (unsigned short index = 0; index < q_size; ++index) {
point3f center = center_q.front();
center_q.pop();
key_loc_map.emplace(node_to_hash_key(depth, index), center);
if (depth == max_depth - 1)
continue;
for (unsigned short i = 0; i < 8; ++i) {
float x = (float) (center.x() + half_size * (i & 4 ? 0.5 : -0.5));
float y = (float) (center.y() + half_size * (i & 2 ? 0.5 : -0.5));
float z = (float) (center.z() + half_size * (i & 1 ? 0.5 : -0.5));
center_q.emplace(x, y, z);
}
}
}
return key_loc_map;
}
std::unordered_map<unsigned short, OcTreeHashKey> init_index_map(
const std::unordered_map<OcTreeHashKey, point3f> &key_loc_map, unsigned short max_depth) {
std::vector<std::pair<OcTreeHashKey, point3f>> temp;
for (auto it = key_loc_map.begin(); it != key_loc_map.end(); ++it) {
unsigned short depth, index;
hash_key_to_node(it->first, depth, index);
if (depth == max_depth - 1)
temp.push_back(std::make_pair(it->first, it->second));
}
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.x() < p2.second.x();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.y() < p2.second.y();
});
std::stable_sort(temp.begin(), temp.end(),
[](const std::pair<OcTreeHashKey, point3f> &p1,
const std::pair<OcTreeHashKey, point3f> &p2) {
return p1.second.z() < p2.second.z();
});
std::unordered_map<unsigned short, OcTreeHashKey> index_map;
int index = 0;
for (auto it = temp.cbegin(); it != temp.cend(); ++it, ++index) {
index_map.insert(std::make_pair(index, it->first));
}
return index_map;
};
BlockHashKey block_to_hash_key(point3f center) {
return block_to_hash_key(center.x(), center.y(), center.z());
}
BlockHashKey block_to_hash_key(float x, float y, float z) {
return (int64_t(x / (double) Block::size + 524288.5) << 40) |
(int64_t(y / (double) Block::size + 524288.5) << 20) |
(int64_t(z / (double) Block::size + 524288.5));
}
point3f hash_key_to_block(BlockHashKey key) {
return point3f(((key >> 40) - 524288) * Block::size,
(((key >> 20) & 0xFFFFF) - 524288) * Block::size,
((key & 0xFFFFF) - 524288) * Block::size);
}
ExtendedBlock get_extended_block(BlockHashKey key) {
ExtendedBlock blocks;
point3f center = hash_key_to_block(key);
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = key;
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
float Block::resolution = 0.1f;
float Block::size = 0.8f;
unsigned short Block::cell_num = static_cast<unsigned short>(round(Block::size / Block::resolution));
std::unordered_map<OcTreeHashKey, point3f> Block::key_loc_map;
std::unordered_map<unsigned short, OcTreeHashKey> Block::index_map;
Block::Block() : OcTree(), center(0.0f, 0.0f, 0.0f) { }
Block::Block(point3f center) : OcTree(), center(center) { }
ExtendedBlock Block::get_extended_block() const {
ExtendedBlock blocks;
float x = center.x();
float y = center.y();
float z = center.z();
blocks[0] = block_to_hash_key(x, y, z);
float ex, ey, ez;
for (int i = 0; i < 6; ++i) {
ex = (i / 2 == 0) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ey = (i / 2 == 1) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
ez = (i / 2 == 2) ? (i % 2 == 0 ? Block::size : -Block::size) : 0;
blocks[i + 1] = block_to_hash_key(ex + x, ey + y, ez + z);
}
return blocks;
}
OcTreeHashKey Block::get_node(unsigned short x, unsigned short y, unsigned short z) const {
unsigned short index = x + y * Block::cell_num + z * Block::cell_num * Block::cell_num;
return Block::index_map[index];
}
point3f Block::get_point(unsigned short x, unsigned short y, unsigned short z) const {
return Block::key_loc_map[get_node(x, y, z)] + center;
}
void Block::get_index(const point3f &p, unsigned short &x, unsigned short &y, unsigned short &z) const {
int xx = static_cast<int>((p.x() - center.x()) / resolution + Block::cell_num / 2);
int yy = static_cast<int>((p.y() - center.y()) / resolution + Block::cell_num / 2);
int zz = static_cast<int>((p.z() - center.z()) / resolution + Block::cell_num / 2);
auto clip = [](int a) -> int { return std::max(0, std::min(a, Block::cell_num - 1)); };
x = static_cast<unsigned short>(clip(xx));
y = static_cast<unsigned short>(clip(yy));
z = static_cast<unsigned short>(clip(zz));
}
OcTreeNode& Block::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
OcTreeNode& Block::search(point3f p) const {
unsigned short x, y, z;
get_index(p, x, y, z);
return operator[](get_node(x, y, z));
}
}
| 6,729 | 41.0625 | 109 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpoctomap.cpp | #include <algorithm>
#include <pcl/filters/voxel_grid.h>
#include "gpoctomap.h"
#include "gpregressor.h"
#include <iostream>
using std::vector;
//#define DEBUG true;
#ifdef DEBUG
#include <iostream>
#define Debug_Msg(msg) {\
std::cout << "Debug: " << msg << std::endl; }
#endif
namespace la3dm {
GPOctoMap::GPOctoMap() : GPOctoMap(0.1f, 4, 1.0, 1.0, 0.01, 100, 0.001f, 1000.0f, 0.02f, 0.3f, 0.7f) { }
GPOctoMap::GPOctoMap(float resolution, unsigned short block_depth, float sf2, float ell, float noise, float l,
float min_var,
float max_var, float max_known_var, float free_thresh, float occupied_thresh)
: resolution(resolution), block_depth(block_depth),
block_size((float) pow(2, block_depth - 1) * resolution) {
Block::resolution = resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
Block::index_map = init_index_map(Block::key_loc_map, block_depth);
OcTree::max_depth = block_depth;
OcTreeNode::sf2 = sf2;
OcTreeNode::ell = ell;
OcTreeNode::noise = noise;
OcTreeNode::l = l;
OcTreeNode::min_ivar = 1.0f / max_var;
OcTreeNode::max_ivar = 1.0f / min_var;
OcTreeNode::min_known_ivar = 1.0f / max_known_var;
OcTreeNode::free_thresh = free_thresh;
OcTreeNode::occupied_thresh = occupied_thresh;
}
GPOctoMap::~GPOctoMap() {
for (auto it = block_arr.begin(); it != block_arr.end(); ++it) {
if (it->second != nullptr) {
delete it->second;
}
}
}
void GPOctoMap::set_resolution(float resolution) {
this->resolution = resolution;
Block::resolution = resolution;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void GPOctoMap::set_block_depth(unsigned short max_depth) {
this->block_depth = max_depth;
OcTree::max_depth = max_depth;
this->block_size = (float) pow(2, block_depth - 1) * resolution;
Block::size = this->block_size;
Block::key_loc_map = init_key_loc_map(resolution, block_depth);
}
void GPOctoMap::insert_training_data(const GPPointCloud &xy) {
if (xy.empty())
return;
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
for (auto it = xy.cbegin(); it != xy.cend(); ++it) {
float p[] = {it->first.x(), it->first.y(), it->first.z()};
rtree.Insert(p, p, const_cast<GPPointType *>(&*it));
}
/////////////////////////////////////////////////
////////// Training /////////////////////////////
/////////////////////////////////////////////////
vector<BlockHashKey> test_blocks;
std::unordered_map<BlockHashKey, GPR3f *> gpr_arr;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
ExtendedBlock eblock = get_extended_block(key);
if (has_gp_points_in_bbox(eblock))
#ifdef OPENMP
#pragma omp critical
#endif
{
test_blocks.push_back(key);
};
GPPointCloud block_xy;
get_gp_points_in_bbox(key, block_xy);
if (block_xy.size() < 1)
continue;
vector<float> block_x, block_y;
for (auto it = block_xy.cbegin(); it != block_xy.cend(); ++it) {
block_x.push_back(it->first.x());
block_x.push_back(it->first.y());
block_x.push_back(it->first.z());
block_y.push_back(it->second);
}
GPR3f *gpr = new GPR3f(OcTreeNode::sf2, OcTreeNode::ell, OcTreeNode::noise);
gpr->train(block_x, block_y);
#ifdef OPENMP
#pragma omp critical
#endif
{
gpr_arr.emplace(key, gpr);
};
}
#ifdef DEBUG
Debug_Msg("GP training done");
Debug_Msg("GP prediction: block number: " << test_blocks.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
Block *block;
#ifdef OPENMP
#pragma omp critical
#endif
{
block = search(key);
if (block == nullptr)
// if (block_arr.find(key) == block_arr.end())
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
vector<float> xs;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
point3f p = block->get_loc(leaf_it);
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
}
ExtendedBlock eblock = block->get_extended_block();
for (auto block_it = eblock.cbegin(); block_it != eblock.cend(); ++block_it) {
auto gpr = gpr_arr.find(*block_it);
if (gpr == gpr_arr.end())
continue;
vector<float> m, var;
gpr->second->predict(xs, m, var);
int j = 0;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it, ++j) {
OcTreeNode &node = leaf_it.get_node();
node.update(m[j], var[j]);
}
}
}
#ifdef DEBUG
Debug_Msg("GP prediction done");
#endif
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
/////////////////////////////////////////////////
// #ifdef OPENMP
// #pragma omp parallel for
// #endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
for (auto it = gpr_arr.begin(); it != gpr_arr.end(); ++it)
delete it->second;
rtree.RemoveAll();
}
void GPOctoMap::insert_pointcloud(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_res, float max_range) {
#ifdef DEBUG
Debug_Msg("Insert pointcloud: " << "cloud size: " << cloud.size() << " origin: " << origin);
#endif
////////// Preparation //////////////////////////
/////////////////////////////////////////////////
GPPointCloud xy;
get_training_data(cloud, origin, ds_resolution, free_res, max_range, xy);
#ifdef DEBUG
Debug_Msg("Training data size: " << xy.size());
#endif
// If pointcloud after max_range filtering is empty
// no need to do anything
if (xy.size() == 0) {
return;
}
point3f lim_min, lim_max;
bbox(xy, lim_min, lim_max);
vector<BlockHashKey> blocks;
get_blocks_in_bbox(lim_min, lim_max, blocks);
for (auto it = xy.cbegin(); it != xy.cend(); ++it) {
float p[] = {it->first.x(), it->first.y(), it->first.z()};
rtree.Insert(p, p, const_cast<GPPointType *>(&*it));
}
/////////////////////////////////////////////////
////////// Training /////////////////////////////
/////////////////////////////////////////////////
vector<BlockHashKey> test_blocks;
std::unordered_map<BlockHashKey, GPR3f *> gpr_arr;
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < blocks.size(); ++i) {
BlockHashKey key = blocks[i];
ExtendedBlock eblock = get_extended_block(key);
if (has_gp_points_in_bbox(eblock))
#ifdef OPENMP
#pragma omp critical
#endif
{
test_blocks.push_back(key);
};
GPPointCloud block_xy;
get_gp_points_in_bbox(key, block_xy);
if (block_xy.size() < 1)
continue;
vector<float> block_x, block_y;
for (auto it = block_xy.cbegin(); it != block_xy.cend(); ++it) {
block_x.push_back(it->first.x());
block_x.push_back(it->first.y());
block_x.push_back(it->first.z());
block_y.push_back(it->second);
}
GPR3f *gpr = new GPR3f(OcTreeNode::sf2, OcTreeNode::ell, OcTreeNode::noise);
gpr->train(block_x, block_y);
#ifdef OPENMP
#pragma omp critical
#endif
{
gpr_arr.emplace(key, gpr);
};
}
#ifdef DEBUG
Debug_Msg("GP training done");
Debug_Msg("GP prediction: block number: " << test_blocks.size());
#endif
/////////////////////////////////////////////////
////////// Prediction ///////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for schedule(dynamic)
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
#ifdef OPENMP
#pragma omp critical
#endif
{
if (block_arr.find(key) == block_arr.end())
block_arr.emplace(key, new Block(hash_key_to_block(key)));
};
Block *block = block_arr[key];
vector<float> xs;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it) {
point3f p = block->get_loc(leaf_it);
xs.push_back(p.x());
xs.push_back(p.y());
xs.push_back(p.z());
}
ExtendedBlock eblock = block->get_extended_block();
for (auto block_it = eblock.cbegin(); block_it != eblock.cend(); ++block_it) {
auto gpr = gpr_arr.find(*block_it);
if (gpr == gpr_arr.end())
continue;
vector<float> m, var;
gpr->second->predict(xs, m, var);
int j = 0;
for (auto leaf_it = block->begin_leaf(); leaf_it != block->end_leaf(); ++leaf_it, ++j) {
OcTreeNode &node = leaf_it.get_node();
node.update(m[j], var[j]);
}
}
}
#ifdef DEBUG
Debug_Msg("GP prediction done");
#endif
/////////////////////////////////////////////////
////////// Pruning //////////////////////////////
/////////////////////////////////////////////////
#ifdef OPENMP
#pragma omp parallel for
#endif
for (int i = 0; i < test_blocks.size(); ++i) {
BlockHashKey key = test_blocks[i];
auto block = block_arr.find(key);
if (block == block_arr.end())
continue;
block->second->prune();
}
#ifdef DEBUG
Debug_Msg("Pruning done");
#endif
/////////////////////////////////////////////////
////////// Cleaning /////////////////////////////
/////////////////////////////////////////////////
for (auto it = gpr_arr.begin(); it != gpr_arr.end(); ++it)
delete it->second;
rtree.RemoveAll();
}
void GPOctoMap::get_bbox(point3f &lim_min, point3f &lim_max) const {
lim_min = point3f(0, 0, 0);
lim_max = point3f(0, 0, 0);
GPPointCloud centers;
for (auto it = block_arr.cbegin(); it != block_arr.cend(); ++it) {
centers.emplace_back(it->second->get_center(), 1);
}
if (centers.size() > 0) {
bbox(centers, lim_min, lim_max);
lim_min -= point3f(block_size, block_size, block_size) * 0.5;
lim_max += point3f(block_size, block_size, block_size) * 0.5;
}
}
void GPOctoMap::get_training_data(const PCLPointCloud &cloud, const point3f &origin, float ds_resolution,
float free_resolution, float max_range, GPPointCloud &xy) const {
PCLPointCloud sampled_hits;
downsample(cloud, sampled_hits, ds_resolution);
PCLPointCloud frees;
frees.height = 1;
frees.width = 0;
xy.clear();
for (auto it = sampled_hits.begin(); it != sampled_hits.end(); ++it) {
point3f p(it->x, it->y, it->z);
if (max_range > 0) {
double l = (p - origin).norm();
if (l > max_range)
continue;
}
xy.emplace_back(p, 1.0f);
PointCloud frees_n;
beam_sample(p, origin, frees_n, free_resolution);
frees.push_back(PCLPointType(origin.x(), origin.y(), origin.z()));
for (auto p = frees_n.begin(); p != frees_n.end(); ++p) {
frees.push_back(PCLPointType(p->x(), p->y(), p->z()));
frees.width++;
}
}
PCLPointCloud sampled_frees;
downsample(frees, sampled_frees, ds_resolution);
for (auto it = sampled_frees.begin(); it != sampled_frees.end(); ++it) {
xy.emplace_back(point3f(it->x, it->y, it->z), -1);
}
}
void GPOctoMap::downsample(const PCLPointCloud &in, PCLPointCloud &out, float ds_resolution) const {
if (ds_resolution < 0) {
out = in;
return;
}
PCLPointCloud::Ptr pcl_in(new PCLPointCloud(in));
pcl::VoxelGrid<PCLPointType> sor;
sor.setInputCloud(pcl_in);
sor.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
sor.filter(out);
// vector<int> indices;
// pcl_out.is_dense = false;
// pcl::removeNaNFromPointCloud(out, out, indices);
}
void GPOctoMap::beam_sample(const point3f &hit, const point3f &origin, PointCloud &frees,
float free_resolution) const {
frees.clear();
float x0 = origin.x();
float y0 = origin.y();
float z0 = origin.z();
float x = hit.x();
float y = hit.y();
float z = hit.z();
float l = (float) sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0) + (z - z0) * (z - z0));
float nx = (x - x0) / l;
float ny = (y - y0) / l;
float nz = (z - z0) / l;
float d = free_resolution;
while (d < l) {
frees.emplace_back(x0 + nx * d, y0 + ny * d, z0 + nz * d);
d += free_resolution;
}
if (l > free_resolution)
frees.emplace_back(x0 + nx * (l - free_resolution), y0 + ny * (l - free_resolution), z0 + nz * (l - free_resolution));
}
/*
* Compute bounding box of pointcloud
* Precondition: cloud non-empty
*/
void GPOctoMap::bbox(const GPPointCloud &cloud, point3f &lim_min, point3f &lim_max) const {
assert(cloud.size() > 0);
vector<float> x, y, z;
for (auto it = cloud.cbegin(); it != cloud.cend(); ++it) {
x.push_back(it->first.x());
y.push_back(it->first.y());
z.push_back(it->first.z());
}
auto xlim = std::minmax_element(x.cbegin(), x.cend());
auto ylim = std::minmax_element(y.cbegin(), y.cend());
auto zlim = std::minmax_element(z.cbegin(), z.cend());
lim_min.x() = *xlim.first;
lim_min.y() = *ylim.first;
lim_min.z() = *zlim.first;
lim_max.x() = *xlim.second;
lim_max.y() = *ylim.second;
lim_max.z() = *zlim.second;
}
void GPOctoMap::get_blocks_in_bbox(const point3f &lim_min, const point3f &lim_max,
vector<BlockHashKey> &blocks) const {
for (float x = lim_min.x() - block_size; x <= lim_max.x() + 2 * block_size; x += block_size) {
for (float y = lim_min.y() - block_size; y <= lim_max.y() + 2 * block_size; y += block_size) {
for (float z = lim_min.z() - block_size; z <= lim_max.z() + 2 * block_size; z += block_size) {
blocks.push_back(block_to_hash_key(x, y, z));
}
}
}
}
int GPOctoMap::get_gp_points_in_bbox(const BlockHashKey &key,
GPPointCloud &out) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return get_gp_points_in_bbox(lim_min, lim_max, out);
}
int GPOctoMap::has_gp_points_in_bbox(const BlockHashKey &key) {
point3f half_size(block_size / 2.0f, block_size / 2.0f, block_size / 2.0);
point3f lim_min = hash_key_to_block(key) - half_size;
point3f lim_max = hash_key_to_block(key) + half_size;
return has_gp_points_in_bbox(lim_min, lim_max);
}
int GPOctoMap::get_gp_points_in_bbox(const point3f &lim_min, const point3f &lim_max,
GPPointCloud &out) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, GPOctoMap::search_callback, static_cast<void *>(&out));
}
int GPOctoMap::has_gp_points_in_bbox(const point3f &lim_min,
const point3f &lim_max) {
float a_min[] = {lim_min.x(), lim_min.y(), lim_min.z()};
float a_max[] = {lim_max.x(), lim_max.y(), lim_max.z()};
return rtree.Search(a_min, a_max, GPOctoMap::count_callback, NULL);
}
bool GPOctoMap::count_callback(GPPointType *p, void *arg) {
return false;
}
bool GPOctoMap::search_callback(GPPointType *p, void *arg) {
GPPointCloud *out = static_cast<GPPointCloud *>(arg);
out->push_back(*p);
return true;
}
int GPOctoMap::has_gp_points_in_bbox(const ExtendedBlock &block) {
for (auto it = block.cbegin(); it != block.cend(); ++it) {
if (has_gp_points_in_bbox(*it) > 0)
return 1;
}
return 0;
}
int GPOctoMap::get_gp_points_in_bbox(const ExtendedBlock &block,
GPPointCloud &out) {
int n = 0;
for (auto it = block.cbegin(); it != block.cend(); ++it) {
n += get_gp_points_in_bbox(*it, out);
}
return n;
}
Block *GPOctoMap::search(BlockHashKey key) const {
auto block = block_arr.find(key);
if (block == block_arr.end()) {
return nullptr;
} else {
return block->second;
}
}
OcTreeNode GPOctoMap::search(point3f p) const {
Block *block = search(block_to_hash_key(p));
if (block == nullptr) {
return OcTreeNode();
} else {
return OcTreeNode(block->search(p));
}
}
OcTreeNode GPOctoMap::search(float x, float y, float z) const {
return search(point3f(x, y, z));
}
}
| 19,736 | 33.994681 | 130 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpoctomap_server.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include <pcl_ros/transforms.h>
#include <pcl/filters/voxel_grid.h>
#include "markerarray_pub.h"
#include "gpoctomap.h"
tf::TransformListener *listener;
std::string frame_id("/map");
la3dm::GPOctoMap *map;
la3dm::MarkerArrayPub *m_pub_occ, *m_pub_free;
tf::Vector3 last_position;
tf::Quaternion last_orientation;
bool first = true;
double position_change_thresh = 0.1;
double orientation_change_thresh = 0.2;
bool updated = false;
//Universal parameters
std::string map_topic_occ("/occupied_cells_vis_array");
std::string map_topic_free("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 1.0;
double ell = 1.0;
double free_resolution = 0.1;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = true;
//parameters for GPOctomap
double noise = 0.01;
double l = 100;
double min_var = 0.001;
double max_var = 1000;
double max_known_var = 0.02;
void cloudHandler(const sensor_msgs::PointCloud2ConstPtr &cloud) {
tf::StampedTransform transform;
try {
listener->waitForTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, ros::Duration(5.0));
listener->lookupTransform(frame_id, cloud->header.frame_id, cloud->header.stamp, transform); //ros::Time::now() -- Don't use this because processing time delay breaks it
} catch (tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
return;
}
ros::Time start = ros::Time::now();
la3dm::point3f origin;
tf::Vector3 translation = transform.getOrigin();
tf::Quaternion orientation = transform.getRotation();
if (first || orientation.angleShortestPath(last_orientation) > orientation_change_thresh || translation.distance(last_position) > position_change_thresh)
{
ROS_INFO_STREAM("Cloud received");
last_position = translation;
last_orientation = orientation;
origin.x() = (float) translation.x();
origin.y() = (float) translation.y();
origin.z() = (float) translation.z();
sensor_msgs::PointCloud2 cloud_map;
pcl_ros::transformPointCloud(frame_id, *cloud, cloud_map, *listener);
la3dm::PCLPointCloud::Ptr pcl_cloud (new la3dm::PCLPointCloud());
pcl::fromROSMsg(cloud_map, *pcl_cloud);
//downsample for faster mapping
la3dm::PCLPointCloud filtered_cloud;
pcl::VoxelGrid<pcl::PointXYZ> filterer;
filterer.setInputCloud(pcl_cloud);
filterer.setLeafSize(ds_resolution, ds_resolution, ds_resolution);
filterer.filter(filtered_cloud);
if(filtered_cloud.size() > 5){
map->insert_pointcloud(filtered_cloud, origin, (float) resolution, (float) free_resolution, (float) max_range);
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("One cloud finished in " << (end - start).toSec() << "s");
updated = true;
}
if (updated)
{
ros::Time start2 = ros::Time::now();
m_pub_occ->clear();
m_pub_free->clear();
for (auto it = map->begin_leaf(); it != map->end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size)
{
m_pub_occ->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_occ->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution());
}
}
}
else if(it.get_node().get_state() == la3dm::State::FREE)
{
if (original_size)
{
m_pub_free->insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
}
else
{
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
{
m_pub_free->insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map->get_resolution(), it.get_node().get_prob());
}
}
}
}
updated = false;
m_pub_occ->publish();
m_pub_free->publish();
ros::Time end2 = ros::Time::now();
ROS_INFO_STREAM("One map published in " << (end2 - start2).toSec() << "s");
}
}
int main(int argc, char **argv) {
ros::init(argc, argv, "gpoctomap_server");
ros::NodeHandle nh("~");
//incoming pointcloud topic, this could be put into the .yaml too
std::string cloud_topic("/velodyne_points");
//Universal parameters
nh.param<std::string>("topic", map_topic_occ, map_topic_occ);
nh.param<std::string>("topic_free", map_topic_free, map_topic_free);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
//parameters for GPOctomap
nh.param<double>("noise", noise, noise);
nh.param<double>("l", l, l);
nh.param<double>("min_var", min_var, min_var);
nh.param<double>("max_var", max_var, max_var);
nh.param<double>("max_known_var", max_known_var, max_known_var);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"topic: " << map_topic_occ << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"l: " << l << std::endl <<
"min_var: " << min_var << std::endl <<
"max_var: " << max_var << std::endl <<
"max_known_var: " << max_known_var << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size
);
map = new la3dm::GPOctoMap(resolution, block_depth, sf2, ell, noise, l, min_var, max_var, max_known_var, free_thresh, occupied_thresh);
ros::Subscriber point_sub = nh.subscribe<sensor_msgs::PointCloud2>(cloud_topic, 1, cloudHandler);
m_pub_occ = new la3dm::MarkerArrayPub(nh, map_topic_occ, resolution);
m_pub_free = new la3dm::MarkerArrayPub(nh, map_topic_free, resolution);
listener = new tf::TransformListener();
while(ros::ok())
{
ros::spin();
}
return 0;
}
| 7,686 | 35.43128 | 177 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpoctomap_static_node.cpp | #include <string>
#include <iostream>
#include <ros/ros.h>
#include "gpoctomap.h"
#include "markerarray_pub.h"
void load_pcd(std::string filename, la3dm::point3f &origin, la3dm::PCLPointCloud &cloud) {
pcl::PCLPointCloud2 cloud2;
Eigen::Vector4f _origin;
Eigen::Quaternionf orientaion;
pcl::io::loadPCDFile(filename, cloud2, _origin, orientaion);
pcl::fromPCLPointCloud2(cloud2, cloud);
origin.x() = _origin[0];
origin.y() = _origin[1];
origin.z() = _origin[2];
}
int main(int argc, char **argv) {
ros::init(argc, argv, "gpoctomap_static_node");
ros::NodeHandle nh("~");
std::string dir;
std::string prefix;
int scan_num = 0;
std::string map_topic("/occupied_cells_vis_array");
std::string map_topic2("/free_cells_vis_array");
double max_range = -1;
double resolution = 0.1;
int block_depth = 4;
double sf2 = 1.0;
double ell = 1.0;
double noise = 0.01;
double l = 100;
double min_var = 0.001;
double max_var = 1000;
double max_known_var = 0.02;
double free_resolution = 0.5;
double ds_resolution = 0.1;
double free_thresh = 0.3;
double occupied_thresh = 0.7;
double min_z = 0;
double max_z = 0;
bool original_size = false;
nh.param<std::string>("dir", dir, dir);
nh.param<std::string>("prefix", prefix, prefix);
nh.param<std::string>("topic", map_topic, map_topic);
nh.param<std::string>("topic2", map_topic2, map_topic2);
nh.param<int>("scan_num", scan_num, scan_num);
nh.param<double>("max_range", max_range, max_range);
nh.param<double>("resolution", resolution, resolution);
nh.param<int>("block_depth", block_depth, block_depth);
nh.param<double>("sf2", sf2, sf2);
nh.param<double>("ell", ell, ell);
nh.param<double>("noise", noise, noise);
nh.param<double>("l", l, l);
nh.param<double>("min_var", min_var, min_var);
nh.param<double>("max_var", max_var, max_var);
nh.param<double>("max_known_var", max_known_var, max_known_var);
nh.param<double>("free_resolution", free_resolution, free_resolution);
nh.param<double>("ds_resolution", ds_resolution, ds_resolution);
nh.param<double>("free_thresh", free_thresh, free_thresh);
nh.param<double>("occupied_thresh", occupied_thresh, occupied_thresh);
nh.param<double>("min_z", min_z, min_z);
nh.param<double>("max_z", max_z, max_z);
nh.param<bool>("original_size", original_size, original_size);
ROS_INFO_STREAM("Parameters:" << std::endl <<
"dir: " << dir << std::endl <<
"prefix: " << prefix << std::endl <<
"topic: " << map_topic << std::endl <<
"scan_sum: " << scan_num << std::endl <<
"max_range: " << max_range << std::endl <<
"resolution: " << resolution << std::endl <<
"block_depth: " << block_depth << std::endl <<
"sf2: " << sf2 << std::endl <<
"ell: " << ell << std::endl <<
"l: " << l << std::endl <<
"min_var: " << min_var << std::endl <<
"max_var: " << max_var << std::endl <<
"max_known_var: " << max_known_var << std::endl <<
"free_resolution: " << free_resolution << std::endl <<
"ds_resolution: " << ds_resolution << std::endl <<
"free_thresh: " << free_thresh << std::endl <<
"occupied_thresh: " << occupied_thresh << std::endl <<
"min_z: " << min_z << std::endl <<
"max_z: " << max_z << std::endl <<
"original_size: " << original_size
);
la3dm::GPOctoMap map(resolution, block_depth, sf2, ell, noise, l, min_var, max_var, max_known_var, free_thresh, occupied_thresh);
ros::Time start = ros::Time::now();
for (int scan_id = 1; scan_id <= scan_num; ++scan_id) {
la3dm::PCLPointCloud cloud;
la3dm::point3f origin;
std::string filename(dir + "/" + prefix + "_" + std::to_string(scan_id) + ".pcd");
load_pcd(filename, origin, cloud);
map.insert_pointcloud(cloud, origin, resolution, free_resolution, max_range);
ROS_INFO_STREAM("Scan " << scan_id << " done");
}
ros::Time end = ros::Time::now();
ROS_INFO_STREAM("Mapping finished in " << (end - start).toSec() << "s");
///////// Publish Map /////////////////////
la3dm::MarkerArrayPub m_pub(nh, map_topic, resolution);
la3dm::MarkerArrayPub m_pub2(nh, map_topic2, resolution);
if (min_z == max_z) {
la3dm::point3f lim_min, lim_max;
map.get_bbox(lim_min, lim_max);
min_z = lim_min.z();
max_z = lim_max.z();
}
for (auto it = map.begin_leaf(); it != map.end_leaf(); ++it) {
la3dm::point3f p = it.get_loc();
if (it.get_node().get_state() == la3dm::State::OCCUPIED) {
if (original_size) {
m_pub.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size());
} else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution());
}
}
else if (it.get_node().get_state() == la3dm::State::FREE) {
if (original_size) {
m_pub2.insert_point3d(p.x(), p.y(), p.z(), min_z, max_z, it.get_size(), it.get_node().get_prob());
} else {
auto pruned = it.get_pruned_locs();
for (auto n = pruned.cbegin(); n < pruned.cend(); ++n)
m_pub2.insert_point3d(n->x(), n->y(), n->z(), min_z, max_z, map.get_resolution(), it.get_node().get_prob());
}
}
}
m_pub.publish();
m_pub2.publish();
ros::spin();
return 0;
}
| 5,814 | 38.828767 | 133 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpoctree.cpp | #include "gpoctree.h"
#include <cmath>
namespace la3dm {
unsigned short OcTree::max_depth = 0;
OcTreeHashKey node_to_hash_key(unsigned short depth, unsigned short index) {
return (depth << 16) + index;
}
void hash_key_to_node(OcTreeHashKey key, unsigned short &depth, unsigned short &index) {
depth = (unsigned short) (key >> 16);
index = (unsigned short) (key & 0xFFFF);
}
OcTree::OcTree() {
if (max_depth <= 0)
node_arr = nullptr;
else {
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
node_arr[i] = new OcTreeNode[(int) pow(8, i)]();
}
}
}
OcTree::~OcTree() {
if (node_arr != nullptr) {
for (unsigned short i = 0; i < max_depth; ++i) {
if (node_arr[i] != nullptr) {
delete[] node_arr[i];
}
}
delete[] node_arr;
}
}
OcTree::OcTree(const OcTree &other) {
if (other.node_arr == nullptr) {
node_arr = nullptr;
return;
}
node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (other.node_arr[i] != nullptr) {
int n = (int) pow(8, i);
node_arr[i] = new OcTreeNode[n]();
std::copy(node_arr[i], node_arr[i] + n, other.node_arr[i]);
} else
node_arr[i] = nullptr;
}
}
OcTree &OcTree::operator=(const OcTree &other) {
OcTreeNode **local_node_arr = new OcTreeNode *[max_depth]();
for (unsigned short i = 0; i < max_depth; ++i) {
if (local_node_arr[i] != nullptr) {
int n = (int) pow(8, i);
local_node_arr[i] = new OcTreeNode[n]();
std::copy(local_node_arr[i], local_node_arr[i] + n, other.node_arr[i]);
} else
local_node_arr[i] = nullptr;
}
node_arr = local_node_arr;
return *this;
}
bool OcTree::is_leaf(unsigned short depth, unsigned short index) const {
if (node_arr != nullptr && node_arr[depth] != nullptr && node_arr[depth][index].get_state() != State::PRUNED) {
if (depth + 1 < max_depth) {
if (node_arr[depth + 1] == nullptr || node_arr[depth + 1][index * 8].get_state() == State::PRUNED)
return true;
} else {
return true;
}
}
return false;
}
bool OcTree::is_leaf(OcTreeHashKey key) const {
unsigned short depth = 0;
unsigned short index = 0;
hash_key_to_node(key, depth, index);
return is_leaf(depth, index);
}
bool OcTree::search(OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr != nullptr &&
node_arr[depth] != nullptr &&
node_arr[depth][index].get_state() != State::PRUNED;
}
bool OcTree::prune() {
if (node_arr == nullptr)
return false;
bool pruned = false;
for (unsigned short depth = max_depth - 1; depth > 0; --depth) {
OcTreeNode *layer = node_arr[depth];
OcTreeNode *parent_layer = node_arr[depth - 1];
if (layer == nullptr)
continue;
bool empty_layer = true;
unsigned int n = (unsigned int) pow(8, depth);
for (unsigned short index = 0; index < n; index += 8) {
State state = layer[index].get_state();
if (state == State::UNKNOWN) {
empty_layer = false;
continue;
}
if (state == State::PRUNED)
continue;
bool collapsible = true;
for (unsigned short i = 1; i < 8; ++i) {
if (layer[index + i].get_state() != state) {
collapsible = false;
continue;
}
}
if (collapsible) {
parent_layer[(int) floor(index / 8)] = layer[index];
for (unsigned short i = 0; i < 8; ++i) {
layer[index + i].prune();
}
pruned = true;
} else {
empty_layer = false;
}
}
if (empty_layer) {
delete[] layer;
node_arr[depth] = nullptr;
}
}
return pruned;
}
OcTreeNode &OcTree::operator[](OcTreeHashKey key) const {
unsigned short depth;
unsigned short index;
hash_key_to_node(key, depth, index);
return node_arr[depth][index];
}
} | 4,952 | 30.954839 | 119 | cpp |
la3dm | la3dm-master/src/gpoctomap/gpoctree_node.cpp | #include "gpoctree_node.h"
#include "gpregressor.h"
#include <cmath>
namespace la3dm {
/// Default static values
float Occupancy::sf2 = 1.0f;
float Occupancy::ell = 1.0f;
float Occupancy::noise = 0.01f;
float Occupancy::l = 100.f;
float Occupancy::max_ivar = 1000.0f;
float Occupancy::min_ivar = 0.001f;
float Occupancy::min_known_ivar = 10.0f;
float Occupancy::free_thresh = 0.3f;
float Occupancy::occupied_thresh = 0.7f;
Occupancy::Occupancy(float m, float var) : m_ivar(m / var), ivar(1.0f / var) {
classified = false;
if (ivar < Occupancy::min_known_ivar)
state = State::UNKNOWN;
else {
ivar = ivar > Occupancy::max_ivar ? Occupancy::max_ivar : ivar;
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
float Occupancy::get_prob() const {
// logistic regression function
return 1.0f / (1.0f + (float) exp(-l * m_ivar / Occupancy::max_ivar));
}
void Occupancy::update(float new_m, float new_var) {
classified = true;
ivar += 1.0 / new_var - Occupancy::sf2;
m_ivar += new_m / new_var;
if (ivar < Occupancy::min_known_ivar)
state = State::UNKNOWN;
else {
// chop variance
ivar = ivar > Occupancy::max_ivar ? Occupancy::max_ivar : ivar;
float p = get_prob();
state = p > Occupancy::occupied_thresh ? State::OCCUPIED : (p < Occupancy::free_thresh ? State::FREE
: State::UNKNOWN);
}
}
std::ofstream &operator<<(std::ofstream &os, const Occupancy &oc) {
os.write((char *) &oc.m_ivar, sizeof(oc.m_ivar));
os.write((char *) &oc.ivar, sizeof(oc.ivar));
return os;
}
std::ifstream &operator>>(std::ifstream &is, Occupancy &oc) {
float m_ivar, ivar;
is.read((char *) &m_ivar, sizeof(m_ivar));
is.read((char *) &ivar, sizeof(ivar));
oc = OcTreeNode(m_ivar / ivar, 1.0f / ivar);
return is;
}
std::ostream &operator<<(std::ostream &os, const Occupancy &oc) {
return os << '(' << (oc.m_ivar / oc.ivar) << ' ' << (1.0 / oc.ivar) << ' ' << oc.get_prob() << ')';
}
}
| 2,517 | 35.492754 | 117 | cpp |
null | CARL-main/carl/envs/rna/data/download_and_build_rfam_learn.sh | #!/usr/bin/env bash
# So far RNA has been tested only on linux systems
mkdir -p data/rfam_learn/{raw,test,train,validation}
cd data/
wget https://www.dropbox.com/s/cfhnkzdx4ciy7zf/rfam_learn.tar.gz?dl=1 -O rfam_learn.tar.gz
tar xf rfam_learn.tar.gz
rm -f rfam_learn.tar.gz | 274 | 29.555556 | 90 | sh |
null | CARL-main/carl/envs/rna/data/download_and_build_rfam_taneda.sh | # So far RNA has been tested only on linux systems
cd data/
mkdir rfam_taneda
cd rfam_taneda
wget rna.eit.hirosaki-u.ac.jp/modena/v0028/linux/modena.dataset.tar.gz
tar -xf modena.dataset.tar.gz
rm -f modena.dataset.tar.gz
rm -rf ct_version
i=1
while [[ i -le 30 ]]; do
if [ $i == 23 ]; then
:
elif [[ $i -le 9 ]]; then
cat RF0000$i* > $i.rna;
elif [[ $i -le 22 ]]; then
cat RF000$i* > $i.rna;
else
cat RF000$i* > $(($i - 1)).rna;
fi
let i=$i+1;
done
rm -f *.ss | 510 | 16.62069 | 70 | sh |
null | CARL-main/carl/envs/rna/data/secondaries_to_single_files.sh | # So far RNA has been tested only on linux systems
DATAPATH=$1
SECONDARY_FILE=$2
NUM_SECONDARIES=$(cat $SECONDARY_FILE | wc -l )
i=1;
while [[ i -le $NUM_SECONDARIES ]];
do awk "NR==$i{print;exit}" $SECONDARY_FILE > $DATAPATH/$i.rna;
let i=$i+1;
done
Footer
| 262 | 19.230769 | 64 | sh |
null | CARL-main/docs/themes/smac/docs-navbar.html | <div class="container-xl">
<div id="navbar-start">
{% for navbar_item in theme_navbar_start %}
{% include navbar_item %}
{% endfor %}
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapsible" aria-controls="navbar-collapsible" aria-expanded="false" aria-label="{{ _('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
{% set navbar_class, navbar_align = navbar_align_class() %}
<div id="navbar-collapsible" class="{{ navbar_class }} collapse navbar-collapse">
<div id="navbar-center" class="{{ navbar_align }}">
{% for navbar_item in theme_navbar_center %}
<div class="navbar-center-item">
{% include navbar_item %}
</div>
{% endfor %}
</div>
<div id="navbar-end">
{% for navbar_item in theme_navbar_end %}
<div class="navbar-end-item">
{% include navbar_item %}
</div>
{% endfor %}
</div>
</div>
</div>
| 995 | 30.125 | 203 | html |
null | CARL-main/docs/themes/smac/docs-sidebar.html | 0 | 0 | 0 | html |
|
null | CARL-main/docs/themes/smac/footer.html | <footer class="footer mt-5 mt-md-0">
<div class="container">
{% for footer_item in theme_footer_items %}
<div class="footer-item">
{% include footer_item %}
</div>
{% endfor %}
</div>
</footer> | 219 | 23.444444 | 47 | html |
null | CARL-main/docs/themes/smac/gc.html | <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Site') }} <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc">{{ toctree(maxdepth=10) }}</ul>
</li> | 200 | 49.25 | 102 | html |
null | CARL-main/docs/themes/smac/icon-links.html | {%- macro icon_link_nav_item(url, icon, name) -%}
{%- if url | length > 2 %}
<li class="nav-item">
<a class="nav-link" href="{{ url }}" rel="noopener" target="_blank" title="{{ _(name) }}">
<span><i class="{{ icon }}"></i></span>
<label class="sr-only">{{ _(name) }}</label>
</a>
</li>
{%- endif -%}
{%- endmacro -%}
<ul id="navbar-icon-links" class="navbar-nav" aria-label="{{ _(theme_icon_links_label) }}">
{%- block icon_link_shortcuts -%}
{{ icon_link_nav_item(theme_github_url, "fab fa-github-square", "GitHub") -}}
{{ icon_link_nav_item(theme_gitlab_url, "fab fa-gitlab", "GitLab") -}}
{{ icon_link_nav_item(theme_bitbucket_url, "fab fa-bitbucket", "Bitbucket") -}}
{{ icon_link_nav_item(theme_twitter_url, "fab fa-twitter-square", "Twitter") -}}
{% endblock -%}
{%- for icon_link in theme_icon_links -%}
{{ icon_link_nav_item(icon_link["url"], icon_link["icon"], icon_link["name"]) -}}
{%- endfor %}
</ul>
| 1,062 | 45.217391 | 100 | html |
null | CARL-main/docs/themes/smac/layout.html | {%- extends "basic/layout.html" %}
{%- import "static/webpack-macros.html" as _webpack with context %}
{%- block css %}
{{ _webpack.head_pre_bootstrap() }}
{{ _webpack.head_pre_icons() }}
{% block fonts %}
{{ _webpack.head_pre_fonts() }}
{% endblock %}
{{- css() }}
{{ _webpack.head_js_preload() }}
{%- endblock %}
{%- block extrahead %}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="docsearch:language" content="{{ language }}">
{% for favicon in theme_favicons %}
{% if favicon.href[:4] == 'http'%}
<link rel="{{ favicon.rel }}" sizes="{{ favicon.sizes }}" href="{{ favicon.href }}">
{% else %}
<link rel="{{ favicon.rel }}" sizes="{{ favicon.sizes }}" href="{{ pathto('_static/' + favicon.href, 1) }}">
{% endif %}
{% endfor %}
<!-- Google Analytics -->
{{ generate_google_analytics_script(id=theme_google_analytics_id) }}
{%- endblock %}
{# Silence the sidebar's, relbar's #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}
{% block body_tag %}
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
{%- endblock %}
{%- block content %}
{# Added to support a banner with an alert #}
<div class="container-fluid" id="banner"></div>
{% block docs_navbar %}
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main">
{%- include "docs-navbar.html" %}
</nav>
{% endblock %}
<div class="container-xl">
<div class="row">
{% block docs_sidebar %}
{% if sidebars %}
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
{% else %}
<div class="col-12 col-md-1 col-xl-2 bd-sidebar no-sidebar"></div>
{% endif %}
{% endblock %}
{% block docs_toc %}
<div class="d-none d-xl-block col-xl-2 bd-toc">
{% if meta is defined and not (meta is not none and 'notoc' in meta) %}
{% for toc_item in theme_page_sidebar_items %}
<div class="toc-item">
{% include toc_item %}
</div>
{% endfor %}
{% endif %}
</div>
{% endblock %}
{% block docs_main %}
{% if sidebars %}
{% set content_col_class = "col-md-9 col-xl-7" %}
{% else %}
{% set content_col_class = "col-md-11 col-xl-8" %}
{% endif %}
<main class="col-12 {{ content_col_class }} py-md-5 pl-md-5 pr-md-4 bd-content" role="main">
{% block docs_body %}
<div>
{% block body %} {% endblock %}
</div>
{% endblock %}
{% if theme_show_prev_next %}
{% include "templates/prev-next.html" %}
{% endif %}
</main>
{% endblock %}
</div>
</div>
{%- block scripts_end %}
{{ _webpack.body_post() }}
{%- endblock %}
{%- endblock %}
{%- block footer %}
{%- include "footer.html" %}
{%- endblock %}
| 3,409 | 31.169811 | 114 | html |
null | CARL-main/docs/themes/smac/search-field.html | <form class="bd-search align-items-center" action="{{ pathto('search') }}" method="get"
style="width: 100%;">
<i class="icon fas fa-search"></i>
<input type="search" class="form-control" name="q" id="search-input" placeholder="{{ _(theme_search_bar_text) }}" aria-label="{{ theme_search_bar_text }}" autocomplete="off" >
</form>
| 334 | 46.857143 | 177 | html |
null | CARL-main/docs/themes/smac/title.html | <h4 class="mt-0 mb-0">{{ project }}</h4>
<div class="mb-3">v{{ version }}</div> | 79 | 39 | 40 | html |
null | CARL-main/docs/themes/smac/static/webpack-macros.html | <!-- these macros are generated by "yarn build:production". do not edit by hand. -->
{% macro head_pre_icons() %}
<link rel="stylesheet"
href="{{ pathto('_static/vendor/fontawesome/5.13.0/css/all.min.css', 1) }}">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="{{ pathto('_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2', 1) }}">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="{{ pathto('_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2', 1) }}">
{% endmacro %}
{% macro head_pre_fonts() %}
{% endmacro %}
{% macro head_pre_bootstrap() %}
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet">
<link href="{{ pathto('_static/css/index.ac9c05f7c49ca1e1f876c6e36360ea26.css', 1) }}" rel="stylesheet">
{% endmacro %}
{% macro head_js_preload() %}
<link rel="preload" as="script" href="{{ pathto('_static/js/index.9ea38e314b9e6d9dab77.js', 1) }}">
{% endmacro %}
{% macro body_post() %}
<script src="{{ pathto('_static/js/index.9ea38e314b9e6d9dab77.js', 1) }}"></script>
{% endmacro %} | 1,094 | 42.8 | 106 | html |
null | CARL-main/docs/themes/smac/templates/copyright.html | <p class="copyright">
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br>
{%- else %}
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}<br>
{%- endif %}
</p> | 310 | 43.428571 | 139 | html |
null | CARL-main/docs/themes/smac/templates/edit-this-page.html | {% if sourcename is defined and theme_use_edit_page_button==true and page_source_suffix %}
{% set src = sourcename.split('.') %}
<div class="tocsection editthispage">
<a href="{{ get_edit_url() }}">
<i class="fas fa-pencil-alt"></i> {{ _("Edit this page") }}
</a>
</div>
{% endif %}
| 299 | 32.333333 | 90 | html |
null | CARL-main/docs/themes/smac/templates/last-updated.html | <p class="last-updated">
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br>
</p> | 122 | 40 | 92 | html |
null | CARL-main/docs/themes/smac/templates/navbar-icon-links.html | {%- block icon_links -%}
{%- include "icon-links.html" with context -%}
{%- endblock %} | 87 | 28.333333 | 46 | html |
null | CARL-main/docs/themes/smac/templates/navbar-logo.html | {% if logo %}
{% if not theme_logo_link %}
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>
{% elif theme_logo_link[:4] == 'http' %}
<a class="navbar-brand" href="{{ theme_logo_link }}">
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>
{% else %}
<a class="navbar-brand" href="{{ pathto(theme_logo_link) }}">
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
</a>
{% endif %}
{% else %}
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
<p class="title">{{ project }}</p>
</a>
{% endif %} | 639 | 32.684211 | 72 | html |
null | CARL-main/docs/themes/smac/templates/navbar-nav.html | <ul id="navbar-main-elements" class="navbar-nav">
{{ generate_nav_html("navbar", maxdepth=1, collapse=True, includehidden=True, titles_only=True) }}
{% for external_link in theme_external_links %}
<li class="nav-item">
<a class="nav-link nav-external" href="{{ external_link.url }}">{{ _(external_link.name) }}<i class="fas fa-external-link-alt"></i></a>
</li>
{% endfor %}
</ul> | 407 | 50 | 143 | html |
null | CARL-main/docs/themes/smac/templates/page-toc.html | {% set page_toc = generate_toc_html() %}
{%- if page_toc | length >= 1 %}
<div class="tocsection onthispage pt-5 pb-3">
<i class="fas fa-list"></i> {{ _("On this page") }}
</div>
{%- endif %}
<nav id="bd-toc-nav">
{{ page_toc }}
</nav> | 245 | 21.363636 | 55 | html |
null | CARL-main/docs/themes/smac/templates/prev-next.html | <!-- Previous / next buttons -->
<div class='prev-next-area'>
{%- if prev %}
<a class='left-prev' id="prev-link" href="{{ prev.link|e }}" title="{{ _('previous') }} {{ _('page') }}">
<i class="fas fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">{{ _("previous") }}</p>
<p class="prev-next-title">{{ prev_title or prev.title }}</p>
</div>
</a>
{%- endif %}
{%- if next %}
<a class='right-next' id="next-link" href="{{ next.link|e }}" title="{{ _('next') }} {{ _('page') }}">
<div class="prev-next-info">
<p class="prev-next-subtitle">{{ _("next") }}</p>
<p class="prev-next-title">{{ next_title or next.title }}</p>
</div>
<i class="fas fa-angle-right"></i>
</a>
{%- endif %}
</div> | 821 | 38.142857 | 109 | html |
null | CARL-main/docs/themes/smac/templates/sidebar-ethical-ads.html | {% if READTHEDOCS %}
<div
id="ethical-ad-placement"
class="flat"
data-ea-publisher="readthedocs"
data-ea-type="readthedocs-sidebar"
data-ea-manual="true"
></div>
{% endif %}
| 184 | 17.5 | 36 | html |
null | CARL-main/docs/themes/smac/templates/sidebar-nav-bs.html | <nav class="bd-links" id="bd-docs-nav" aria-label="{{ _('Main navigation') }}">
<div class="bd-toc-item active">
{{ generate_nav_html("sidebar",
maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=True,
titles_only=True) }}
</div>
</nav>
| 388 | 37.9 | 79 | html |
null | CARL-main/docs/themes/smac/templates/sphinx-version.html | <p class="sphinx-version">
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a>
{{ sphinx_version }}. Template is modified version of <a
href="https://pydata-sphinx-theme.readthedocs.io">PyData Sphinx Theme</a>. {% endtrans %}<br>
</p> | 283 | 55.8 | 100 | html |
GNOT | GNOT-master/gnot_exp.sh | ### an example for training Naiver-Stokes equation on irregular domains
python train.py --gpu 0 --dataset ns2d --use-normalizer unit --normalize_x unit --component all --comment rel2 --loss-name rel2 --epochs 500 --batch-size 4 --model-name CGPT --optimizer AdamW --weight-decay 0.00005 --lr 0.001 --lr-method cycle --grad-clip 1000.0 --n-hidden 128 --n-layers 3 --use-tb 1 # 2>&1 & sleep 20s
| 402 | 133.333333 | 329 | sh |
null | coax-main/doc/versions.html | <style>
.version.matrix {
width: 100%;
}
.version.options {
column-fill: balance;
column-gap: 0;
text-align: center;
}
.version.title {
width: 25%;
padding: 10px 10px 10px 0px;
}
.version.option {
background: #E3E3E3;
padding: 10px 5px 10px 5px;
margin: 0px 1px;
}
.version.option:hover {
color: #FFF;
background: #A9A9A9;
}
.version.option.selected {
color: #FFF;
background: #676767;
}
.version.option.unavailable {
color: #D6D6D6;
background: #E3E3E3;
}
</style>
<p>
<table class="version matrix">
<tbody>
<tr>
<td class="version title os">OS:</td>
<td class="version options os" style="column-count: 2">
<div id="macosx_10_9_x86_64" class="version option os">Mac</div>
<div id="manylinux2010_x86_64" class="version option os selected">Linux</div>
<!-- if you add a row here, make sure to update 'column-count' as well -->
</td>
</tr>
<tr>
<td class="version title cuda">CUDA version:</td>
<td class="version options cuda" style="column-count: 5">
<div id="nocuda" class="version option cuda selected">none</div>
<div id="cuda101" class="version option cuda">10.1</div>
<div id="cuda102" class="version option cuda">10.2</div>
<div id="cuda110" class="version option cuda">11.0</div>
<div id="cuda111" class="version option cuda">11.1</div>
<!-- if you add a row here, make sure to update 'column-count' as well -->
</td>
</tr>
</tbody>
</table>
</p>
Command to run:
<div class="highlight-bash notranslate">
<div class="highlight">
<pre id="codecell0">
<span></span>$ pip install --upgrade jaxlib jax coax
</pre>
</div>
</div>
<script>
// removes from global namespace
(function() {
// init form
var osVersions = document.getElementsByClassName('version option os')
var pythonVersions = document.getElementsByClassName('version option python')
var cudaVersions = document.getElementsByClassName('version option cuda')
function selectOption(e) {
if (e.target.classList.contains('selected')) {
return;
}
// update selection
var options = document.getElementsByClassName(e.target.className);
for (var i=0, len=options.length; i<len; i++) {
options[i].classList.remove('selected')
}
e.target.classList.add('selected');
// select 'nocuda' if 'macos' is selected
if (document.getElementById('macosx_10_9_x86_64').classList.contains('selected') ) {
for (var i=0, len=cudaVersions.length; i<len; i++) {
if (cudaVersions[i].id === 'nocuda') {
cudaVersions[i].classList.add('selected');
} else {
cudaVersions[i].classList.remove('selected');
cudaVersions[i].classList.add('unavailable');
}
}
} else {
// make cuda versions available again if 'linux' is selected
for (var i=0, len=cudaVersions.length; i<len; i++) {
cudaVersions[i].classList.remove('unavailable');
}
}
// update the codecell with the installation command
updateCommand();
}
function updateCommand() {
var codecellName = 'codecell0';
var jaxlibVersion = '0.3.25'; // this is automatically updated from conf.py
// get the selected os version
var osVersion = null;
for (var i=0, len=osVersions.length; i<len; i++) {
if (osVersions[i].classList.contains('selected')) {
osVersion = osVersions[i].id;
break;
}
}
// get the selected cuda version
var cudaVersion = null;
for (var i=0, len=cudaVersions.length; i<len; i++) {
if (cudaVersions[i].classList.contains('selected')) {
cudaVersion = cudaVersions[i].id;
break;
}
}
var command = document.getElementById(codecellName);
if (cudaVersion === 'nocuda') {
command.innerHTML = "$ pip install --upgrade coax jax jaxlib";
} else {
command.innerHTML = `$ pip install --upgrade coax jax jaxlib==${jaxlibVersion}+${cudaVersion} -f https://storage.googleapis.com/jax-releases/jax_releases.html
`
}
}
// init
for (var i=0, len=osVersions.length; i<len; i++) {
osVersions[i].onclick = selectOption;
}
for (var i=0, len=pythonVersions.length; i<len; i++) {
pythonVersions[i].onclick = selectOption;
}
for (var i=0, len=cudaVersions.length; i<len; i++) {
cudaVersions[i].onclick = selectOption;
}
updateCommand();
}());
</script>
| 4,720 | 29.458065 | 170 | html |
null | coax-main/doc/examples/atari/run_all.sh | #!/bin/bash
trap "kill 0" EXIT
gio trash -f ./data
for f in $(ls ./*.py); do
python3 $f &
done
wait
| 107 | 8.818182 | 25 | sh |
null | coax-main/doc/examples/cartpole/run_all.sh | #!/bin/bash
trap "kill 0" EXIT
gio trash -f ./data
for f in $(ls ./*.py); do
JAX_PLATFORM_NAME=cpu python3 $f &
done
wait
| 129 | 10.818182 | 38 | sh |
null | coax-main/doc/examples/dmc/run_all.sh | #!/bin/bash
trap "kill 0" EXIT
gio trash -f ./data
for f in $(ls ./*.py); do
JAX_PLATFORM_NAME=cpu python3 $f &
done
wait
| 129 | 10.818182 | 38 | sh |
null | coax-main/doc/examples/frozen_lake/run_all.sh | #!/bin/bash
trap "kill 0" EXIT
gio trash -f ./data
for f in $(ls ./*.py); do
JAX_PLATFORM_NAME=cpu python3 $f &
done
wait
| 129 | 10.818182 | 38 | sh |
null | coax-main/doc/examples/pendulum/run_all.sh | #!/bin/bash
trap "kill 0" EXIT
gio trash -f ./data
for f in $(ls ./*.py); do
JAX_PLATFORM_NAME=cpu python3 $f &
done
wait
| 129 | 10.818182 | 38 | sh |
null | hspo-ontology-main/docs/ontology-specification/406.html | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head>
<body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource could not be found on this server.</p>
Available variants:<ul><li><a href="index-en.html">html</a></li><li><a href="ontology.jsonld">JSON-LD</a></li><li><a href="ontology.rdf">RDF/XML</a></li><li><a href="ontology.nt">N-Triples</a></li><li><a href="ontology.ttl">TTL</a></li></ul>
</body></html> | 493 | 48.4 | 242 | html |
null | hspo-ontology-main/docs/ontology-specification/index.html | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="resources/primer.css" media="screen" /> <link rel="stylesheet" href="resources/rec.css" media="screen" /> <link rel="stylesheet" href="resources/extra.css" media="screen" /> <link rel="stylesheet" href="resources/owl.css" media="screen" /> <title>Health and Social Person-centric Ontology (HSPO)</title>
<!-- SCHEMA.ORG METADATA -->
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","url":"http://research.ibm.com/ontologies/hspo/","image":"http://vowl.visualdataweb.org/webvowl/#iri=http://research.ibm.com/ontologies/hspo/","name":"Health and Social Person-centric Ontology (HSPO)", "headline":"The Health and Social Person-centric Ontology (HSPO) describes a schema for specifying evidences about a person in a consistent way. The model allows but not limited to specify evidence, interventions and outcomes in health and social care domains.", "datePublished":"2023-02-15", "version":"0.0.19", "author":[{"@type":"Person","name":"IBM Research Europe"}]}</script>
<script src="resources/jquery.js"></script>
<script src="resources/marked.min.js"></script>
<script>
function loadHash() {
jQuery(".markdown").each(function(el){jQuery(this).after(marked(jQuery(this).text())).remove()});
var hash = location.hash;
if($(hash).offset()!=null){
$('html, body').animate({scrollTop: $(hash).offset().top}, 0);
}
loadTOC();
}
function loadTOC(){
//process toc dynamically
var t='<h2>Table of contents</h2><ul>';i = 1;j=0;
jQuery(".list").each(function(){
if(jQuery(this).is('h2')){
if(j>0){
t+='</ul>';
j=0;
}
t+= '<li>'+i+'. <a href=#'+ jQuery(this).attr('id')+'>'+ jQuery(this).ignore("span").text()+'</a></li>';
i++;
}
if(jQuery(this).is('h3')){
if(j==0){
t+='<ul>';
}
j++;
t+= '<li>'+(i-1)+'.'+j+'. '+'<a href=#'+ jQuery(this).attr('id')+'>'+ jQuery(this).ignore("span").text()+'</a></li>';
}
});
t+='</ul>';
$("#toc").html(t);
}
$(function(){
loadHash();
}); $.fn.ignore = function(sel){
return this.clone().find(sel||">*").remove().end();
};
</script>
</head>
<body>
<div class="container">
<div class="head">
<div style="float:right">language <a href="index.html"><b>en</b></a> </div>
<h1>Health and Social Person-centric Ontology (HSPO)</h1>
<h2>Release 2023-02-15</h2>
<dl>
<dt>Latest version:</dt>
<dd><a href="http://research.ibm.com/ontologies/hspo/">http://research.ibm.com/ontologies/hspo/</a></dd>
<dt>Revision:</dt>
<dd>0.0.19</dd>
<dt>Authors:</dt>
<dd>IBM Research Europe</dd>
<dt>Publisher:</dt>
<dd>IBM</dd>
<dt>Download serialization:</dt><dd><span><a href="ontology.jsonld" target="_blank"><img src="https://img.shields.io/badge/Format-JSON_LD-blue.svg" alt="JSON-LD" /></a> </span><span><a href="ontology.rdf" target="_blank"><img src="https://img.shields.io/badge/Format-RDF/XML-blue.svg" alt="RDF/XML" /></a> </span><span><a href="ontology.nt" target="_blank"><img src="https://img.shields.io/badge/Format-N_Triples-blue.svg" alt="N-Triples" /></a> </span><span><a href="ontology.ttl" target="_blank"><img src="https://img.shields.io/badge/Format-TTL-blue.svg" alt="TTL" /></a> </span></dd><dt>License:</dt><dd><img src="https://img.shields.io/badge/License-Apache_2.0-green.svg" alt="Apache 2.0">
</dd><dt>Visualization:</dt><dd><a href="webvowl/index.html#" target="_blank"><img src="https://img.shields.io/badge/Visualize_with-WebVowl-blue.svg" alt="Visualize with WebVowl" /></a></dd>
<!-- <dt>Evaluation:</dt><dd><a href="OOPSEvaluation/oopsEval.html#" target="_blank"><img src="https://img.shields.io/badge/Evaluate_with-OOPS! (OntOlogy Pitfall Scanner!)-blue.svg" alt="Evaluate with OOPS!" /></a></dd> --><dt>Cite as:</dt>
<dd>IBM Research Europe. Health and Social Person-centric Ontology (HSPO). Revision: 0.0.19.</dd>
</dl>
<hr/>
</div>
<div class="status">
<div>
<span>Ontology Specification Draft</span>
</div>
</div> <div id="abstract"><h2>Abstract</h2><span class="markdown">
The Health and Social Person-centric Ontology (HSPO) describes a schema for specifying evidences about a person in a consistent way.
The model allows but not limited to specify evidence, interventions and outcomes in health and social care domains.</span>
</div>
<div id="toc"></div>
<!--INTRODUCTION SECTION-->
<div id="introduction"><h2 id="intro" class="list">Introduction <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<span class="markdown">
Please see the HSPO documentation and user guide for further information here:
<a href="https://ibm.github.io/hspo-ontology/">https://ibm.github.io/hspo-ontology</a>.</span>
<div id="namespacedeclarations">
<h3 id="ns" class="list">Namespace declarations</h3>
<div id="ns" align="center">
<table>
<caption> <a href="#ns"> Table 1</a>: Namespaces used in the document </caption>
<tbody>
<tr><td><b>[Ontology NS Prefix]</b></td><td><http://research.ibm.com/ontologies/hspo/></td></tr>
<tr><td></td><td></td></tr>
<tr><td><b>owl</b></td><td><http://www.w3.org/2002/07/owl></td></tr>
<tr><td><b>rdf</b></td><td><http://www.w3.org/1999/02/22-rdf-syntax-ns></td></tr>
<tr><td><b>terms</b></td><td><http://purl.org/dc/terms></td></tr>
<tr><td><b>oboInOwl</b></td><td><http://www.geneontology.org/formats/oboInOwl></td></tr>
<tr><td><b>xml</b></td><td><http://www.w3.org/XML/1998/namespace></td></tr>
<tr><td><b>xsd</b></td><td><http://www.w3.org/2001/XMLSchema></td></tr>
<tr><td><b>skos</b></td><td><http://www.w3.org/2004/02/skos/core></td></tr>
<tr><td><b>rdfs</b></td><td><http://www.w3.org/2000/01/rdf-schema></td></tr>
<tr><td><b>prov</b></td><td><http://www.w3.org/ns/prov></td></tr>
<tr><td><b>dc</b></td><td><http://purl.org/dc/elements/1.1></td></tr>
<tr><td><b>efo</b></td><td><http://www.ebi.ac.uk/efo></td></tr>
</tbody>
</table>
</div>
</div>
</div>
<!--OVERVIEW SECTION-->
<div id="overview"><h2 id="overv" class="list">Health and Social Person-centric Ontology (HSPO): Overview <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<span class="markdown">
This ontology has the following classes and properties.</span>
<h4>Classes</h4>
<ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="hlist">
<li>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
</li>
<li>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
</li>
<li>
<a href="#AlignmentScore"
title="http://research.ibm.com/ontologies/hspo/AlignmentScore">Alignment Score</a>
</li>
<li>
<a href="#Behaviour"
title="http://research.ibm.com/ontologies/hspo/Behaviour">Behaviour</a>
</li>
<li>
<a href="#BuiltEnvironment"
title="http://research.ibm.com/ontologies/hspo/BuiltEnvironment">Built Environment</a>
</li>
<li>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
</li>
<li>
<a href="#DatasourceTrustScore"
title="http://research.ibm.com/ontologies/hspo/DatasourceTrustScore">Datasource Trust Score</a>
</li>
<li>
<a href="#Disease" title="http://research.ibm.com/ontologies/hspo/Disease">Disease</a>
</li>
<li>
<a href="#Duration"
title="http://research.ibm.com/ontologies/hspo/Duration">Duration</a>
</li>
<li>
<a href="#Educational"
title="http://research.ibm.com/ontologies/hspo/Educational">Educational</a>
</li>
<li>
<a href="#Employment"
title="http://research.ibm.com/ontologies/hspo/Employment">Employment</a>
</li>
<li>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
</li>
<li>
<a href="#EvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/EvidenceGraph">Evidence Graph</a>
</li>
<li>
<a href="#EvidenceSource"
title="http://research.ibm.com/ontologies/hspo/EvidenceSource">Evidence Source</a>
</li>
<li>
<a href="#Financial"
title="http://research.ibm.com/ontologies/hspo/Financial">Financial</a>
</li>
<li>
<a href="#Food" title="http://research.ibm.com/ontologies/hspo/Food">Food Security</a>
</li>
<li>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
</li>
<li>
<a href="#HealthAndWelfare"
title="http://research.ibm.com/ontologies/hspo/HealthAndWelfare">Health and Welfare System</a>
</li>
<li>
<a href="#Homelessness"
title="http://research.ibm.com/ontologies/hspo/Homelessness">Homelessness</a>
</li>
<li>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
</li>
<li>
<a href="#HouseholdCrowding"
title="http://research.ibm.com/ontologies/hspo/HouseholdCrowding">Household Crowding</a>
</li>
<li>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
</li>
<li>
<a href="#HousingStability"
title="http://research.ibm.com/ontologies/hspo/HousingStability">Housing Stability</a>
</li>
<li>
<a href="#InterpersonalSocialAndCommunityEnvironment"
title="http://research.ibm.com/ontologies/hspo/InterpersonalSocialAndCommunityEnvironment">Interpersonal, Social and Community Environment</a>
</li>
<li>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
</li>
<li>
<a href="#InterventionByAssessment"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssessment">Intervention by Assessment</a>
</li>
<li>
<a href="#InterventionByAssistance"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssistance">Intervention by Assistance</a>
</li>
<li>
<a href="#InterventionByCoordination"
title="http://research.ibm.com/ontologies/hspo/InterventionByCoordination">Intervention by Coordination</a>
</li>
<li>
<a href="#InterventionByCounseling"
title="http://research.ibm.com/ontologies/hspo/InterventionByCounseling">Intervention by Counseling</a>
</li>
<li>
<a href="#InterventionByEducation"
title="http://research.ibm.com/ontologies/hspo/InterventionByEducation">Intervention by Education</a>
</li>
<li>
<a href="#InterventionByEvaluationOfEligibility"
title="http://research.ibm.com/ontologies/hspo/InterventionByEvaluationOfEligibility">Intervention by Evaluation of Eligibility</a>
</li>
<li>
<a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
</li>
<li>
<a href="#InterventionByReffering"
title="http://research.ibm.com/ontologies/hspo/InterventionByReffering">Intervention by Referral</a>
</li>
<li>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
</li>
<li>
<a href="#InterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeMetric">Intervention Outcome Metric</a>
</li>
<li>
<a href="#InterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeResult">Intervention Outcome Result</a>
</li>
<li>
<a href="#InterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeType">Intervention Outcome Type</a>
</li>
<li>
<a href="#InterventionProvider"
title="http://research.ibm.com/ontologies/hspo/InterventionProvider">Intervention Provider</a>
</li>
<li>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
</li>
<li>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
</li>
<li>
<a href="#Judicial"
title="http://research.ibm.com/ontologies/hspo/Judicial">Judicial</a>
</li>
<li>
<a href="#LivingConditions"
title="http://research.ibm.com/ontologies/hspo/LivingConditions">Living Conditions</a>
</li>
<li>
<a href="#Location"
title="http://research.ibm.com/ontologies/hspo/Location">Location</a>
</li>
<li>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
</li>
<li>
<a href="#OriginalProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore">Original Probability Score</a>
</li>
<li>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
</li>
<li>
<a href="#Political"
title="http://research.ibm.com/ontologies/hspo/Political">Political</a>
</li>
<li>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
</li>
<li>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
</li>
<li>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
</li>
<li>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
</li>
<li>
<a href="#Transportation"
title="http://research.ibm.com/ontologies/hspo/Transportation">Transportation</a>
</li>
<li>
<a href="#HousingProblemUnspecified"
title="http://research.ibm.com/ontologies/hspo/HousingProblemUnspecified">Unspecified Housing Problem</a>
</li>
</ul><h4>Object Properties</h4><ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="hlist">
<li>
<a href="#belongsToAgeGroup"
title="http://research.ibm.com/ontologies/hspo/belongsToAgeGroup">belongsToAgeGroup</a>
</li>
<li>
<a href="#followsReligion"
title="http://research.ibm.com/ontologies/hspo/followsReligion">followsReligion</a>
</li>
<li>
<a href="#hasAge" title="http://research.ibm.com/ontologies/hspo/hasAge">hasAge</a>
</li>
<li>
<a href="#hasAlignmentScore"
title="http://research.ibm.com/ontologies/hspo/hasAlignmentScore">hasAlignmentScore</a>
</li>
<li>
<a href="#hasBehaviour"
title="http://research.ibm.com/ontologies/hspo/hasBehaviour">hasBehaviour</a>
</li>
<li>
<a href="#hasConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/hasConfidenceScore">hasConfidenceScore</a>
</li>
<li>
<a href="#hasDisease"
title="http://research.ibm.com/ontologies/hspo/hasDisease">hasDisease</a>
</li>
<li>
<a href="#hasDuration"
title="http://research.ibm.com/ontologies/hspo/hasDuration">hasDuration</a>
</li>
<li>
<a href="#hasEvidence"
title="http://research.ibm.com/ontologies/hspo/hasEvidence">hasEvidence</a>
</li>
<li>
<a href="#hasEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceGraph">hasEvidenceGraph</a>
</li>
<li>
<a href="#hasEvidenceSource"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceSource">hasEvidenceSource</a>
</li>
<li>
<a href="#hasGender"
title="http://research.ibm.com/ontologies/hspo/hasGender">hasGender</a>
</li>
<li>
<a href="#hasIntervention"
title="http://research.ibm.com/ontologies/hspo/hasIntervention">hasIntervention</a>
</li>
<li>
<a href="#hasInterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcome">hasInterventionOutcome</a>
</li>
<li>
<a href="#hasInterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeMetric">hasInterventionOutcomeMetric</a>
</li>
<li>
<a href="#hasInterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeResult">hasInterventionOutcomeResult</a>
</li>
<li>
<a href="#hasInterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeType">hasInterventionOutcomeType</a>
</li>
<li>
<a href="#hasInterventionProvider"
title="http://research.ibm.com/ontologies/hspo/hasInterventionProvider">hasInterventionProvider</a>
</li>
<li>
<a href="#hasInterventionStatus"
title="http://research.ibm.com/ontologies/hspo/hasInterventionStatus">hasInterventionStatus</a>
</li>
<li>
<a href="#hasInterventionType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionType">hasInterventionType</a>
</li>
<li>
<a href="#hasMaritalStatus"
title="http://research.ibm.com/ontologies/hspo/hasMaritalStatus">hasMaritalStatus</a>
</li>
<li>
<a href="#hasProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/hasProbabilityScore">hasProbabilityScore</a>
</li>
<li>
<a href="#hasRaceOrEthnicity"
title="http://research.ibm.com/ontologies/hspo/hasRaceOrEthnicity">hasRaceOrEthnicity</a>
</li>
<li>
<a href="#hasSocialContext"
title="http://research.ibm.com/ontologies/hspo/hasSocialContext">hasSocialContext</a>
</li>
<li>
<a href="#hasStageOfLife"
title="http://research.ibm.com/ontologies/hspo/hasStageOfLife">hasStageOfLife</a>
</li>
<li>
<a href="#hasTrustScore"
title="http://research.ibm.com/ontologies/hspo/hasTrustScore">hasTrustScore</a>
</li>
<li>
<a href="#isPartOfEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/isPartOfEvidenceGraph">isPartOfEvidenceGraph</a>
</li>
<li>
<a href="#lives" title="http://research.ibm.com/ontologies/hspo/lives">lives</a>
</li>
</ul><h4>Data Properties</h4><ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="hlist">
<li>
<a href="#age_in_years"
title="http://research.ibm.com/ontologies/hspo/age_in_years">Age in years</a>
</li>
<li>
<a href="#alignment_score_value"
title="http://research.ibm.com/ontologies/hspo/alignment_score_value">Alignment score value</a>
</li>
<li>
<a href="#source_ID"
title="http://research.ibm.com/ontologies/hspo/source_ID">Datasource ID</a>
</li>
<li>
<a href="#intervention_code"
title="http://research.ibm.com/ontologies/hspo/intervention_code">Intervention code</a>
</li>
<li>
<a href="#intervention_code_system"
title="http://research.ibm.com/ontologies/hspo/intervention_code_system">Intervention code system</a>
</li>
<li>
<a href="#intervention_name"
title="http://research.ibm.com/ontologies/hspo/intervention_name">Intervention name</a>
</li>
<li>
<a href="#number_in_household"
title="http://research.ibm.com/ontologies/hspo/number_in_household">Number in household</a>
</li>
<li>
<a href="#person_id"
title="http://research.ibm.com/ontologies/hspo/person_id">Person ID</a>
</li>
<li>
<a href="#positivity_indicator"
title="http://research.ibm.com/ontologies/hspo/positivity_indicator">Positivity indicator</a>
</li>
<li>
<a href="#probability_score_metric"
title="http://research.ibm.com/ontologies/hspo/probability_score_metric">Probability score metric</a>
</li>
<li>
<a href="#probability_score_value"
title="http://research.ibm.com/ontologies/hspo/probability_score_value">Probability score value</a>
</li>
<li>
<a href="#trust_score"
title="http://research.ibm.com/ontologies/hspo/trust_score">Trust score</a>
</li>
</ul><h4>Annotation Properties</h4><ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="hlist">
<li>
<a href="#http://purl.org/dc/elements/1.1/abstract" title="http://purl.org/dc/elements/1.1/abstract">
<span>abstract</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2004/02/skos/core#broader" title="http://www.w3.org/2004/02/skos/core#broader">
<span>broader</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2002/07/owl#cardinality" title="http://www.w3.org/2002/07/owl#cardinality">
<span>cardinality</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/created" title="http://purl.org/dc/elements/1.1/created">
<span>created</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/created" title="http://purl.org/dc/terms/created">
<span>created</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/creator" title="http://purl.org/dc/elements/1.1/creator">
<span>creator</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/description" title="http://purl.org/dc/elements/1.1/description">
<span>description</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2000/01/rdf-schema#displayName" title="http://www.w3.org/2000/01/rdf-schema#displayName">
<span>display name</span>
</a>
</li>
<li>
<a href="#http://www.geneontology.org/formats/oboInOwl#hasDbXref"
title="http://www.geneontology.org/formats/oboInOwl#hasDbXref">hasMapping</a>
</li>
<li>
<a href="#icd10Code" title="http://research.ibm.com/ontologies/hspo/icd10Code">
<span>icd10 code</span>
</a>
</li>
<li>
<a href="#icd9Code" title="http://research.ibm.com/ontologies/hspo/icd9Code">
<span>icd9 code</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/modified" title="http://purl.org/dc/elements/1.1/modified">
<span>modified</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/modified" title="http://purl.org/dc/terms/modified">
<span>modified</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2004/02/skos/core#narrower" title="http://www.w3.org/2004/02/skos/core#narrower">
<span>narrower</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/publisher" title="http://purl.org/dc/elements/1.1/publisher">
<span>publisher</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/1999/02/22-rdf-syntax-ns#resource"
title="http://www.w3.org/1999/02/22-rdf-syntax-ns#resource">
<span>resource</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/source" title="http://purl.org/dc/elements/1.1/source">
<span>source</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/title" title="http://purl.org/dc/elements/1.1/title">
<span>title</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/title" title="http://purl.org/dc/terms/title">
<span>title</span>
</a>
</li>
<li>
<a href="#umlsCui" title="http://research.ibm.com/ontologies/hspo/umlsCui">
<span>umls cui</span>
</a>
</li>
</ul><h4>Named Individuals</h4><ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="hlist">
<li>
<a href="#ten_to_fourteen"
title="http://research.ibm.com/ontologies/hspo/ten_to_fourteen">10 to 14</a>
</li>
<li>
<a href="#fifteen_to_nineteen"
title="http://research.ibm.com/ontologies/hspo/fifteen_to_nineteen">15 to 19</a>
</li>
<li>
<a href="#twenty_to_twentyfour"
title="http://research.ibm.com/ontologies/hspo/twenty_to_twentyfour">20 to 24</a>
</li>
<li>
<a href="#twentyfive_to_twentynine"
title="http://research.ibm.com/ontologies/hspo/twentyfive_to_twentynine">25 to 29</a>
</li>
<li>
<a href="#thirty_to_thirtyfour"
title="http://research.ibm.com/ontologies/hspo/thirty_to_thirtyfour">30 to 34</a>
</li>
<li>
<a href="#thirtyfive_to_thirtynine"
title="http://research.ibm.com/ontologies/hspo/thirtyfive_to_thirtynine">35 to 39</a>
</li>
<li>
<a href="#forty_to_fortyfour"
title="http://research.ibm.com/ontologies/hspo/forty_to_fortyfour">40 to 44</a>
</li>
<li>
<a href="#fortyfive_to_fortynine"
title="http://research.ibm.com/ontologies/hspo/fortyfive_to_fortynine">45 to 49</a>
</li>
<li>
<a href="#five_to_nine"
title="http://research.ibm.com/ontologies/hspo/five_to_nine">5 to 9</a>
</li>
<li>
<a href="#fifty_to_fiftyfour"
title="http://research.ibm.com/ontologies/hspo/fifty_to_fiftyfour">50 to 54</a>
</li>
<li>
<a href="#fiftyfive_to_fiftynine"
title="http://research.ibm.com/ontologies/hspo/fiftyfive_to_fiftynine">55 to 59</a>
</li>
<li>
<a href="#sixty_to_sixtyfour"
title="http://research.ibm.com/ontologies/hspo/sixty_to_sixtyfour">60 to 64</a>
</li>
<li>
<a href="#sixtyfive_to_sixtynine"
title="http://research.ibm.com/ontologies/hspo/sixtyfive_to_sixtynine">65 to 69</a>
</li>
<li>
<a href="#seventy_to_seventyfour"
title="http://research.ibm.com/ontologies/hspo/seventy_to_seventyfour">70 to 74</a>
</li>
<li>
<a href="#seventyfive_to_seventynine"
title="http://research.ibm.com/ontologies/hspo/seventyfive_to_seventynine">75 to 79</a>
</li>
<li>
<a href="#eighty_to_eightyfour"
title="http://research.ibm.com/ontologies/hspo/eighty_to_eightyfour">80 to 84</a>
</li>
<li>
<a href="#eightyfive_and_over"
title="http://research.ibm.com/ontologies/hspo/eightyfive_and_over">85 and over</a>
</li>
<li>
<a href="#adult" title="http://research.ibm.com/ontologies/hspo/adult">Adult</a>
</li>
<li>
<a href="#african_race"
title="http://research.ibm.com/ontologies/hspo/african_race">African race</a>
</li>
<li>
<a href="#agnosticism"
title="http://research.ibm.com/ontologies/hspo/agnosticism">Agnosticism</a>
</li>
<li>
<a href="#american_indian_or_alaska_native"
title="http://research.ibm.com/ontologies/hspo/american_indian_or_alaska_native">American Indian or Alaska native</a>
</li>
<li>
<a href="#applied_intervention"
title="http://research.ibm.com/ontologies/hspo/applied_intervention">Applied intervention</a>
</li>
<li>
<a href="#asian_or_pacific_islander"
title="http://research.ibm.com/ontologies/hspo/asian_or_pacific_islander">Asian or Pacific islander</a>
</li>
<li>
<a href="#atheism" title="http://research.ibm.com/ontologies/hspo/atheism">Atheism</a>
</li>
<li>
<a href="#australian_aborigine"
title="http://research.ibm.com/ontologies/hspo/australian_aborigine">Australian aborigine</a>
</li>
<li>
<a href="#available_intervention"
title="http://research.ibm.com/ontologies/hspo/available_intervention">Available intervention</a>
</li>
<li>
<a href="#bachelor"
title="http://research.ibm.com/ontologies/hspo/bachelor">Bachelor</a>
</li>
<li>
<a href="#bahai" title="http://research.ibm.com/ontologies/hspo/bahai">Baha'i Faith</a>
</li>
<li>
<a href="#broken_engagement"
title="http://research.ibm.com/ontologies/hspo/broken_engagement">Broken engagement</a>
</li>
<li>
<a href="#broken_with_partner"
title="http://research.ibm.com/ontologies/hspo/broken_with_partner">Broken with partner</a>
</li>
<li>
<a href="#buddhism"
title="http://research.ibm.com/ontologies/hspo/buddhism">Buddhism</a>
</li>
<li>
<a href="#mahayana"
title="http://research.ibm.com/ontologies/hspo/mahayana">Buddhism: Mahayana</a>
</li>
<li>
<a href="#buddhism_other"
title="http://research.ibm.com/ontologies/hspo/buddhism_other">Buddhism: Other</a>
</li>
<li>
<a href="#tantrayana"
title="http://research.ibm.com/ontologies/hspo/tantrayana">Buddhism: Tantrayana</a>
</li>
<li>
<a href="#theravada"
title="http://research.ibm.com/ontologies/hspo/theravada">Buddhism: Theravada</a>
</li>
<li>
<a href="#caucasian"
title="http://research.ibm.com/ontologies/hspo/caucasian">Caucasian</a>
</li>
<li>
<a href="#child" title="http://research.ibm.com/ontologies/hspo/child">Child</a>
</li>
<li>
<a href="#child_lives_with_unrelated_adult"
title="http://research.ibm.com/ontologies/hspo/child_lives_with_unrelated_adult">Child lives with unrelated adult</a>
</li>
<li>
<a href="#chinese_folk_religion"
title="http://research.ibm.com/ontologies/hspo/chinese_folk_religion">Chinese Folk Religion</a>
</li>
<li>
<a href="#christian"
title="http://research.ibm.com/ontologies/hspo/christian">Christian</a>
</li>
<li>
<a href="#african_methodist_episcopal"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal">Christian: African Methodist Episcopal</a>
</li>
<li>
<a href="#african_methodist_episcopal_zion"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal_zion">Christian: African Methodist Episcopal Zion</a>
</li>
<li>
<a href="#american_baptist_church"
title="http://research.ibm.com/ontologies/hspo/american_baptist_church">Christian: American Baptist Church</a>
</li>
<li>
<a href="#anglican"
title="http://research.ibm.com/ontologies/hspo/anglican">Christian: Anglican</a>
</li>
<li>
<a href="#assembly_of_god"
title="http://research.ibm.com/ontologies/hspo/assembly_of_god">Christian: Assembly of God</a>
</li>
<li>
<a href="#aptist_church"
title="http://research.ibm.com/ontologies/hspo/aptist_church">Christian: Baptist Church</a>
</li>
<li>
<a href="#christian_missionary_alliance"
title="http://research.ibm.com/ontologies/hspo/christian_missionary_alliance">Christian: Christian Missionary Alliance</a>
</li>
<li>
<a href="#christian_reformed"
title="http://research.ibm.com/ontologies/hspo/christian_reformed">Christian: Christian Reformed</a>
</li>
<li>
<a href="#christian_science"
title="http://research.ibm.com/ontologies/hspo/christian_science">Christian: Christian Science Church</a>
</li>
<li>
<a href="#church_of_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_christ">Christian: Church of Christ</a>
</li>
<li>
<a href="#church_of_god"
title="http://research.ibm.com/ontologies/hspo/church_of_god">Christian: Church of God</a>
</li>
<li>
<a href="#church_of_god_in_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_god_in_christ">Christian: Church of God in Christ</a>
</li>
<li>
<a href="#church_of_the_nazarene"
title="http://research.ibm.com/ontologies/hspo/church_of_the_nazarene">Christian: Church of the Nazarene</a>
</li>
<li>
<a href="#community_church"
title="http://research.ibm.com/ontologies/hspo/community_church">Christian: Community Church</a>
</li>
<li>
<a href="#congregational_church"
title="http://research.ibm.com/ontologies/hspo/congregational_church">Christian: Congregational</a>
</li>
<li>
<a href="#eastern_orthodox"
title="http://research.ibm.com/ontologies/hspo/eastern_orthodox">Christian: Eastern Orthodox</a>
</li>
<li>
<a href="#episcopalian"
title="http://research.ibm.com/ontologies/hspo/episcopalian">Christian: Episcopalian</a>
</li>
<li>
<a href="#evangelical_church"
title="http://research.ibm.com/ontologies/hspo/evangelical_church">Christian: Evangelical Church</a>
</li>
<li>
<a href="#free_will_baptist"
title="http://research.ibm.com/ontologies/hspo/free_will_baptist">Christian: Free Will Baptist</a>
</li>
<li>
<a href="#friends_church"
title="http://research.ibm.com/ontologies/hspo/friends_church">Christian: Friends Church or Quakers</a>
</li>
<li>
<a href="#greek_orthodox"
title="http://research.ibm.com/ontologies/hspo/greek_orthodox">Christian: Greek Orthodox</a>
</li>
<li>
<a href="#jehovahs_witness"
title="http://research.ibm.com/ontologies/hspo/jehovahs_witness">Christian: Jehovahs Witness</a>
</li>
<li>
<a href="#latter_day_saints_church"
title="http://research.ibm.com/ontologies/hspo/latter_day_saints_church">Christian: Latter-day Saints</a>
</li>
<li>
<a href="#lutheran"
title="http://research.ibm.com/ontologies/hspo/lutheran">Christian: Lutheran</a>
</li>
<li>
<a href="#lutheran_missouri_synod"
title="http://research.ibm.com/ontologies/hspo/lutheran_missouri_synod">Christian: Lutheran Missouri Synod</a>
</li>
<li>
<a href="#mennonite"
title="http://research.ibm.com/ontologies/hspo/mennonite">Christian: Mennonite</a>
</li>
<li>
<a href="#methodist"
title="http://research.ibm.com/ontologies/hspo/methodist">Christian: Methodist</a>
</li>
<li>
<a href="#orthodox"
title="http://research.ibm.com/ontologies/hspo/orthodox">Christian: Orthodox</a>
</li>
<li>
<a href="#christian_other"
title="http://research.ibm.com/ontologies/hspo/christian_other">Christian: Other</a>
</li>
<li>
<a href="#other_pentecostal"
title="http://research.ibm.com/ontologies/hspo/other_pentecostal">Christian: Other Pentecostal</a>
</li>
<li>
<a href="#other_protestant"
title="http://research.ibm.com/ontologies/hspo/other_protestant">Christian: Other Protestant</a>
</li>
<li>
<a href="#pentecostal"
title="http://research.ibm.com/ontologies/hspo/pentecostal">Christian: Pentecostal</a>
</li>
<li>
<a href="#presbyterian"
title="http://research.ibm.com/ontologies/hspo/presbyterian">Christian: Presbyterian</a>
</li>
<li>
<a href="#protestant"
title="http://research.ibm.com/ontologies/hspo/protestant">Christian: Protestant</a>
</li>
<li>
<a href="#reformed_church"
title="http://research.ibm.com/ontologies/hspo/reformed_church">Christian: Reformed Church</a>
</li>
<li>
<a href="#rlds" title="http://research.ibm.com/ontologies/hspo/rlds">Christian: Reorganized Church of Jesus Christ of LDS</a>
</li>
<li>
<a href="#roman_catholic"
title="http://research.ibm.com/ontologies/hspo/roman_catholic">Christian: Roman Catholic</a>
</li>
<li>
<a href="#salvation_army"
title="http://research.ibm.com/ontologies/hspo/salvation_army">Christian: Salvation Army</a>
</li>
<li>
<a href="#seventh_day_adventist"
title="http://research.ibm.com/ontologies/hspo/seventh_day_adventist">Christian: Seventh Day Adventist</a>
</li>
<li>
<a href="#southern_baptist"
title="http://research.ibm.com/ontologies/hspo/southern_baptist">Christian: Southern Baptist Convention</a>
</li>
<li>
<a href="#unitarian"
title="http://research.ibm.com/ontologies/hspo/unitarian">Christian: Unitarian</a>
</li>
<li>
<a href="#unitarian_universalism"
title="http://research.ibm.com/ontologies/hspo/unitarian_universalism">Christian: Unitarian Universalism</a>
</li>
<li>
<a href="#united_church_of_christ"
title="http://research.ibm.com/ontologies/hspo/united_church_of_christ">Christian: United Church of Christ</a>
</li>
<li>
<a href="#united_methodist"
title="http://research.ibm.com/ontologies/hspo/united_methodist">Christian: United Methodist</a>
</li>
<li>
<a href="#wesleyan"
title="http://research.ibm.com/ontologies/hspo/wesleyan">Christian: Wesleyan</a>
</li>
<li>
<a href="#cohabitee_left_home"
title="http://research.ibm.com/ontologies/hspo/cohabitee_left_home">Cohabitee left home</a>
</li>
<li>
<a href="#cohabiting"
title="http://research.ibm.com/ontologies/hspo/cohabiting">Cohabiting</a>
</li>
<li>
<a href="#common_law_partnership"
title="http://research.ibm.com/ontologies/hspo/common_law_partnership">Common law partnership</a>
</li>
<li>
<a href="#confucianism"
title="http://research.ibm.com/ontologies/hspo/confucianism">Confucianism</a>
</li>
<li>
<a href="#divorced"
title="http://research.ibm.com/ontologies/hspo/divorced">Divorced</a>
</li>
<li>
<a href="#divorced_couple_sharing_house"
title="http://research.ibm.com/ontologies/hspo/divorced_couple_sharing_house">Divorced couple sharing house</a>
</li>
<li>
<a href="#domestic_partnership"
title="http://research.ibm.com/ontologies/hspo/domestic_partnership">Domestic partnership</a>
</li>
<li>
<a href="#elderly_relative_lives_with_family"
title="http://research.ibm.com/ontologies/hspo/elderly_relative_lives_with_family">Elderly relative lives with family</a>
</li>
<li>
<a href="#eloped" title="http://research.ibm.com/ontologies/hspo/eloped">Eloped</a>
</li>
<li>
<a href="#engaged_to_be_married"
title="http://research.ibm.com/ontologies/hspo/engaged_to_be_married">Engaged to be married</a>
</li>
<li>
<a href="#ethnic_religion"
title="http://research.ibm.com/ontologies/hspo/ethnic_religion">Ethnic Religion</a>
</li>
<li>
<a href="#feminine_gender"
title="http://research.ibm.com/ontologies/hspo/feminine_gender">Feminine gender</a>
</li>
<li>
<a href="#gender_unknown"
title="http://research.ibm.com/ontologies/hspo/gender_unknown">Gender unknown</a>
</li>
<li>
<a href="#gender_unspecified"
title="http://research.ibm.com/ontologies/hspo/gender_unspecified">Gender unspecified</a>
</li>
<li>
<a href="#hinduism"
title="http://research.ibm.com/ontologies/hspo/hinduism">Hinduism</a>
</li>
<li>
<a href="#hinduism_other"
title="http://research.ibm.com/ontologies/hspo/hinduism_other">Hinduism: Other</a>
</li>
<li>
<a href="#shaivism"
title="http://research.ibm.com/ontologies/hspo/shaivism">Hinduism: Shaivism</a>
</li>
<li>
<a href="#vaishnavism"
title="http://research.ibm.com/ontologies/hspo/vaishnavism">Hinduism: Vaishnavism</a>
</li>
<li>
<a href="#hispanic"
title="http://research.ibm.com/ontologies/hspo/hispanic">Hispanic</a>
</li>
<li>
<a href="#homosexual_marriage"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage">Homosexual marriage</a>
</li>
<li>
<a href="#homosexual_marriage_female"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_female">Homosexual marriage, female</a>
</li>
<li>
<a href="#homosexual_marriage_male"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_male">Homosexual marriage, male</a>
</li>
<li>
<a href="#husband_left_home"
title="http://research.ibm.com/ontologies/hspo/husband_left_home">Husband left home</a>
</li>
<li>
<a href="#indian" title="http://research.ibm.com/ontologies/hspo/indian">Indian</a>
</li>
<li>
<a href="#infant" title="http://research.ibm.com/ontologies/hspo/infant">Infant</a>
</li>
<li>
<a href="#medication_provisioning"
title="http://research.ibm.com/ontologies/hspo/medication_provisioning">Intervention by provisioning a medication</a>
</li>
<li>
<a href="#procedure_provisioning"
title="http://research.ibm.com/ontologies/hspo/procedure_provisioning">Intervention by provisioning a procedure</a>
</li>
<li>
<a href="#social_action_provisioning"
title="http://research.ibm.com/ontologies/hspo/social_action_provisioning">Intervention by provisioning a social action</a>
</li>
<li>
<a href="#jainism" title="http://research.ibm.com/ontologies/hspo/jainism">Jainism</a>
</li>
<li>
<a href="#judaism" title="http://research.ibm.com/ontologies/hspo/judaism">Judaism</a>
</li>
<li>
<a href="#conservative_judaism"
title="http://research.ibm.com/ontologies/hspo/conservative_judaism">Judaism: Conservative Judaism</a>
</li>
<li>
<a href="#jewish_renewal"
title="http://research.ibm.com/ontologies/hspo/jewish_renewal">Judaism: Jewish Renewal</a>
</li>
<li>
<a href="#orthodox_judaism"
title="http://research.ibm.com/ontologies/hspo/orthodox_judaism">Judaism: Orthodox Judaism</a>
</li>
<li>
<a href="#judaism_other"
title="http://research.ibm.com/ontologies/hspo/judaism_other">Judaism: Other</a>
</li>
<li>
<a href="#reconstructionist_judaism"
title="http://research.ibm.com/ontologies/hspo/reconstructionist_judaism">Judaism: Reconstructionist Judaism</a>
</li>
<li>
<a href="#reform_judaism"
title="http://research.ibm.com/ontologies/hspo/reform_judaism">Judaism: Reform Judaism</a>
</li>
<li>
<a href="#legally_separated_with_interlocutory_decree"
title="http://research.ibm.com/ontologies/hspo/legally_separated_with_interlocutory_decree">Legally separated with interlocutory decree</a>
</li>
<li>
<a href="#lives_alone"
title="http://research.ibm.com/ontologies/hspo/lives_alone">Lives alone</a>
</li>
<li>
<a href="#lives_alone_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_help_available">Lives alone, help available</a>
</li>
<li>
<a href="#lives_alone_needs_housekeeper"
title="http://research.ibm.com/ontologies/hspo/lives_alone_needs_housekeeper">Lives alone, needs housekeeper</a>
</li>
<li>
<a href="#lives_alone_no_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_no_help_available">Lives alone, no help available</a>
</li>
<li>
<a href="#lives_as_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_companion">Lives as companion</a>
</li>
<li>
<a href="#lives_as_paid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_paid_companion">Lives as paid companion</a>
</li>
<li>
<a href="#lives_as_unpaid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_unpaid_companion">Lives as unpaid companion</a>
</li>
<li>
<a href="#lives_in_a_commune"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_commune">Lives in a commune</a>
</li>
<li>
<a href="#lives_in_a_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_community">Lives in a community</a>
</li>
<li>
<a href="#lives_in_a_school_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_school_community">Lives in a school community</a>
</li>
<li>
<a href="#lives_in_boarding_school"
title="http://research.ibm.com/ontologies/hspo/lives_in_boarding_school">Lives in boarding school</a>
</li>
<li>
<a href="#lives_with_children"
title="http://research.ibm.com/ontologies/hspo/lives_with_children">Lives with children</a>
</li>
<li>
<a href="#lives_with_companion"
title="http://research.ibm.com/ontologies/hspo/lives_with_companion">Lives with companion</a>
</li>
<li>
<a href="#lives_with_daughter"
title="http://research.ibm.com/ontologies/hspo/lives_with_daughter">Lives with daughter</a>
</li>
<li>
<a href="#lives_with_family"
title="http://research.ibm.com/ontologies/hspo/lives_with_family">Lives with family</a>
</li>
<li>
<a href="#lives_with_father"
title="http://research.ibm.com/ontologies/hspo/lives_with_father">Lives with father</a>
</li>
<li>
<a href="#lives_with_friends"
title="http://research.ibm.com/ontologies/hspo/lives_with_friends">Lives with friends</a>
</li>
<li>
<a href="#lives_with_grandfather"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandfather">Lives with grandfather</a>
</li>
<li>
<a href="#lives_with_grandmother"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandmother">Lives with grandmother</a>
</li>
<li>
<a href="#lives_with_grandparents"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandparents">Lives with grandparents</a>
</li>
<li>
<a href="#lives_with_husband"
title="http://research.ibm.com/ontologies/hspo/lives_with_husband">Lives with husband</a>
</li>
<li>
<a href="#lives_with_lodger"
title="http://research.ibm.com/ontologies/hspo/lives_with_lodger">Lives with lodger</a>
</li>
<li>
<a href="#lives_with_mother"
title="http://research.ibm.com/ontologies/hspo/lives_with_mother">Lives with mother</a>
</li>
<li>
<a href="#lives_with_parents"
title="http://research.ibm.com/ontologies/hspo/lives_with_parents">Lives with parents</a>
</li>
<li>
<a href="#lives_with_partner"
title="http://research.ibm.com/ontologies/hspo/lives_with_partner">Lives with partner</a>
</li>
<li>
<a href="#lives_with_roommate"
title="http://research.ibm.com/ontologies/hspo/lives_with_roommate">Lives with roommate</a>
</li>
<li>
<a href="#lives_with_son"
title="http://research.ibm.com/ontologies/hspo/lives_with_son">Lives with son</a>
</li>
<li>
<a href="#lives_with_spouse"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse">Lives with spouse</a>
</li>
<li>
<a href="#lives_with_spouse_only"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse_only">Lives with spouse only</a>
</li>
<li>
<a href="#lives_with_wife"
title="http://research.ibm.com/ontologies/hspo/lives_with_wife">Lives with wife</a>
</li>
<li>
<a href="#living_temporarily_with_relatives"
title="http://research.ibm.com/ontologies/hspo/living_temporarily_with_relatives">Living temporarily with relatives</a>
</li>
<li>
<a href="#marital_state_unknown"
title="http://research.ibm.com/ontologies/hspo/marital_state_unknown">Marital state unknown</a>
</li>
<li>
<a href="#marriage_annulment"
title="http://research.ibm.com/ontologies/hspo/marriage_annulment">Marriage annulment</a>
</li>
<li>
<a href="#married" title="http://research.ibm.com/ontologies/hspo/married">Married</a>
</li>
<li>
<a href="#masculine_gender"
title="http://research.ibm.com/ontologies/hspo/masculine_gender">Masculine gender</a>
</li>
<li>
<a href="#middle_age_adult"
title="http://research.ibm.com/ontologies/hspo/middle_age_adult">Middle age adult</a>
</li>
<li>
<a href="#monogamous"
title="http://research.ibm.com/ontologies/hspo/monogamous">Monogamous</a>
</li>
<li>
<a href="#muslim" title="http://research.ibm.com/ontologies/hspo/muslim">Muslim</a>
</li>
<li>
<a href="#muslim_other"
title="http://research.ibm.com/ontologies/hspo/muslim_other">Muslim: Other</a>
</li>
<li>
<a href="#shia_islam"
title="http://research.ibm.com/ontologies/hspo/shia_islam">Muslim: Shia Islam</a>
</li>
<li>
<a href="#sunni_islam"
title="http://research.ibm.com/ontologies/hspo/sunni_islam">Muslim: Sunni Islam</a>
</li>
<li>
<a href="#native_american"
title="http://research.ibm.com/ontologies/hspo/native_american">Native American</a>
</li>
<li>
<a href="#new_religion"
title="http://research.ibm.com/ontologies/hspo/new_religion">New Religion Movement</a>
</li>
<li>
<a href="#newly_wed"
title="http://research.ibm.com/ontologies/hspo/newly_wed">Newly wed</a>
</li>
<li>
<a href="#nonreligious"
title="http://research.ibm.com/ontologies/hspo/nonreligious">Non religious</a>
</li>
<li>
<a href="#non_binary_gender"
title="http://research.ibm.com/ontologies/hspo/non_binary_gender">Non-binary gender</a>
</li>
<li>
<a href="#ongoing_intervention"
title="http://research.ibm.com/ontologies/hspo/ongoing_intervention">Ongoing intervention</a>
</li>
<li>
<a href="#other_religion"
title="http://research.ibm.com/ontologies/hspo/other_religion">Other religion</a>
</li>
<li>
<a href="#planned_intervention"
title="http://research.ibm.com/ontologies/hspo/planned_intervention">Planned intervention</a>
</li>
<li>
<a href="#polygamous"
title="http://research.ibm.com/ontologies/hspo/polygamous">Polygamous</a>
</li>
<li>
<a href="#purposely_unmarried_and_sexually_abstinent"
title="http://research.ibm.com/ontologies/hspo/purposely_unmarried_and_sexually_abstinent">Purposely unmarried and sexually abstinent</a>
</li>
<li>
<a href="#race_not_stated"
title="http://research.ibm.com/ontologies/hspo/race_not_stated">Race not stated</a>
</li>
<li>
<a href="#recommended_intervention"
title="http://research.ibm.com/ontologies/hspo/recommended_intervention">Recommended intervention</a>
</li>
<li>
<a href="#rejected_intervention"
title="http://research.ibm.com/ontologies/hspo/rejected_intervention">Rejected intervention</a>
</li>
<li>
<a href="#religion_unknown"
title="http://research.ibm.com/ontologies/hspo/religion_unknown">Religion is unknown</a>
</li>
<li>
<a href="#remarried"
title="http://research.ibm.com/ontologies/hspo/remarried">Remarried</a>
</li>
<li>
<a href="#senior_adult"
title="http://research.ibm.com/ontologies/hspo/senior_adult">Senior Adult</a>
</li>
<li>
<a href="#separated"
title="http://research.ibm.com/ontologies/hspo/separated">Separated</a>
</li>
<li>
<a href="#separated_from_cohabitee"
title="http://research.ibm.com/ontologies/hspo/separated_from_cohabitee">Separated from cohabitee</a>
</li>
<li>
<a href="#shinto" title="http://research.ibm.com/ontologies/hspo/shinto">Shinto or Shintoism</a>
</li>
<li>
<a href="#sikhism" title="http://research.ibm.com/ontologies/hspo/sikhism">Sikhism</a>
</li>
<li>
<a href="#single_person"
title="http://research.ibm.com/ontologies/hspo/single_person">Single person</a>
</li>
<li>
<a href="#single_never_married"
title="http://research.ibm.com/ontologies/hspo/single_never_married">Single, never married</a>
</li>
<li>
<a href="#spinster"
title="http://research.ibm.com/ontologies/hspo/spinster">Spinster</a>
</li>
<li>
<a href="#spiritualism"
title="http://research.ibm.com/ontologies/hspo/spiritualism">Spiritualism</a>
</li>
<li>
<a href="#spouse_left_home"
title="http://research.ibm.com/ontologies/hspo/spouse_left_home">Spouse left home</a>
</li>
<li>
<a href="#transgender_female_to_male"
title="http://research.ibm.com/ontologies/hspo/transgender_female_to_male">Surgically transgendered transsexual, female-to-male</a>
</li>
<li>
<a href="#transgender_male_to_female"
title="http://research.ibm.com/ontologies/hspo/transgender_male_to_female">Surgically transgendered transsexual, male-to-female</a>
</li>
<li>
<a href="#teen" title="http://research.ibm.com/ontologies/hspo/teen">Teenager</a>
</li>
<li>
<a href="#toddler" title="http://research.ibm.com/ontologies/hspo/toddler">Toddler</a>
</li>
<li>
<a href="#transgender"
title="http://research.ibm.com/ontologies/hspo/transgender">Transgender</a>
</li>
<li>
<a href="#trial_separation"
title="http://research.ibm.com/ontologies/hspo/trial_separation">Trial separation</a>
</li>
<li>
<a href="#under_five"
title="http://research.ibm.com/ontologies/hspo/under_five">Under 5</a>
</li>
<li>
<a href="#race_unknown"
title="http://research.ibm.com/ontologies/hspo/race_unknown">Unknown racial group</a>
</li>
<li>
<a href="#widow" title="http://research.ibm.com/ontologies/hspo/widow">Widow</a>
</li>
<li>
<a href="#widowed" title="http://research.ibm.com/ontologies/hspo/widowed">Widowed</a>
</li>
<li>
<a href="#widower" title="http://research.ibm.com/ontologies/hspo/widower">Widower</a>
</li>
<li>
<a href="#wife_left_home"
title="http://research.ibm.com/ontologies/hspo/wife_left_home">Wife left home</a>
</li>
</ul><iframe align="center" width="100%" height ="500px" src="webvowl/index.html"></iframe>
</div>
<!--DESCRIPTION SECTION-->
<div id="description"><h2 id="desc" class="list">Health and Social Person-centric Ontology (HSPO): Description <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<span class="markdown">
This is a placeholder text for the description of your ontology. The description should include an explanation and a diagram explaining how the classes are related, examples of usage, etc.</span>
</div>
<!--CROSSREF SECTION-->
<div id="crossref"><h2 id="crossreference" class="list">Cross-reference for Health and Social Person-centric Ontology (HSPO) classes, object properties and data properties <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
This section provides details for each class and property defined by Health and Social Person-centric Ontology (HSPO).
<div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="classes">
<h3 id="classes-headline" class="list">Classes</h3>
<ul class="hlist">
<li>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
</li>
<li>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
</li>
<li>
<a href="#AlignmentScore"
title="http://research.ibm.com/ontologies/hspo/AlignmentScore">Alignment Score</a>
</li>
<li>
<a href="#Behaviour"
title="http://research.ibm.com/ontologies/hspo/Behaviour">Behaviour</a>
</li>
<li>
<a href="#BuiltEnvironment"
title="http://research.ibm.com/ontologies/hspo/BuiltEnvironment">Built Environment</a>
</li>
<li>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
</li>
<li>
<a href="#DatasourceTrustScore"
title="http://research.ibm.com/ontologies/hspo/DatasourceTrustScore">Datasource Trust Score</a>
</li>
<li>
<a href="#Disease" title="http://research.ibm.com/ontologies/hspo/Disease">Disease</a>
</li>
<li>
<a href="#Duration"
title="http://research.ibm.com/ontologies/hspo/Duration">Duration</a>
</li>
<li>
<a href="#Educational"
title="http://research.ibm.com/ontologies/hspo/Educational">Educational</a>
</li>
<li>
<a href="#Employment"
title="http://research.ibm.com/ontologies/hspo/Employment">Employment</a>
</li>
<li>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
</li>
<li>
<a href="#EvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/EvidenceGraph">Evidence Graph</a>
</li>
<li>
<a href="#EvidenceSource"
title="http://research.ibm.com/ontologies/hspo/EvidenceSource">Evidence Source</a>
</li>
<li>
<a href="#Financial"
title="http://research.ibm.com/ontologies/hspo/Financial">Financial</a>
</li>
<li>
<a href="#Food" title="http://research.ibm.com/ontologies/hspo/Food">Food Security</a>
</li>
<li>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
</li>
<li>
<a href="#HealthAndWelfare"
title="http://research.ibm.com/ontologies/hspo/HealthAndWelfare">Health and Welfare System</a>
</li>
<li>
<a href="#Homelessness"
title="http://research.ibm.com/ontologies/hspo/Homelessness">Homelessness</a>
</li>
<li>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
</li>
<li>
<a href="#HouseholdCrowding"
title="http://research.ibm.com/ontologies/hspo/HouseholdCrowding">Household Crowding</a>
</li>
<li>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
</li>
<li>
<a href="#HousingStability"
title="http://research.ibm.com/ontologies/hspo/HousingStability">Housing Stability</a>
</li>
<li>
<a href="#InterpersonalSocialAndCommunityEnvironment"
title="http://research.ibm.com/ontologies/hspo/InterpersonalSocialAndCommunityEnvironment">Interpersonal, Social and Community Environment</a>
</li>
<li>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
</li>
<li>
<a href="#InterventionByAssessment"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssessment">Intervention by Assessment</a>
</li>
<li>
<a href="#InterventionByAssistance"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssistance">Intervention by Assistance</a>
</li>
<li>
<a href="#InterventionByCoordination"
title="http://research.ibm.com/ontologies/hspo/InterventionByCoordination">Intervention by Coordination</a>
</li>
<li>
<a href="#InterventionByCounseling"
title="http://research.ibm.com/ontologies/hspo/InterventionByCounseling">Intervention by Counseling</a>
</li>
<li>
<a href="#InterventionByEducation"
title="http://research.ibm.com/ontologies/hspo/InterventionByEducation">Intervention by Education</a>
</li>
<li>
<a href="#InterventionByEvaluationOfEligibility"
title="http://research.ibm.com/ontologies/hspo/InterventionByEvaluationOfEligibility">Intervention by Evaluation of Eligibility</a>
</li>
<li>
<a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
</li>
<li>
<a href="#InterventionByReffering"
title="http://research.ibm.com/ontologies/hspo/InterventionByReffering">Intervention by Referral</a>
</li>
<li>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
</li>
<li>
<a href="#InterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeMetric">Intervention Outcome Metric</a>
</li>
<li>
<a href="#InterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeResult">Intervention Outcome Result</a>
</li>
<li>
<a href="#InterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeType">Intervention Outcome Type</a>
</li>
<li>
<a href="#InterventionProvider"
title="http://research.ibm.com/ontologies/hspo/InterventionProvider">Intervention Provider</a>
</li>
<li>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
</li>
<li>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
</li>
<li>
<a href="#Judicial"
title="http://research.ibm.com/ontologies/hspo/Judicial">Judicial</a>
</li>
<li>
<a href="#LivingConditions"
title="http://research.ibm.com/ontologies/hspo/LivingConditions">Living Conditions</a>
</li>
<li>
<a href="#Location"
title="http://research.ibm.com/ontologies/hspo/Location">Location</a>
</li>
<li>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
</li>
<li>
<a href="#OriginalProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore">Original Probability Score</a>
</li>
<li>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
</li>
<li>
<a href="#Political"
title="http://research.ibm.com/ontologies/hspo/Political">Political</a>
</li>
<li>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
</li>
<li>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
</li>
<li>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
</li>
<li>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
</li>
<li>
<a href="#Transportation"
title="http://research.ibm.com/ontologies/hspo/Transportation">Transportation</a>
</li>
<li>
<a href="#HousingProblemUnspecified"
title="http://research.ibm.com/ontologies/hspo/HousingProblemUnspecified">Unspecified Housing Problem</a>
</li>
</ul>
<div class="entity" id="Age">
<h3>Age<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Age</p>
<div class="comment">
<span class="markdown">The age of a person</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#age_in_years"
title="http://research.ibm.com/ontologies/hspo/age_in_years">Age in years</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#belongsToAgeGroup"
title="http://research.ibm.com/ontologies/hspo/belongsToAgeGroup">belongsToAgeGroup</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasStageOfLife"
title="http://research.ibm.com/ontologies/hspo/hasStageOfLife">hasStageOfLife</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasAge" title="http://research.ibm.com/ontologies/hspo/hasAge">hasAge</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="AgeGroup">
<h3>Age group<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/AgeGroup</p>
<div class="comment">
<span class="markdown">The age group the person belongs to</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#belongsToAgeGroup"
title="http://research.ibm.com/ontologies/hspo/belongsToAgeGroup">belongsToAgeGroup</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#ten_to_fourteen"
title="http://research.ibm.com/ontologies/hspo/ten_to_fourteen">10 to 14</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#fifteen_to_nineteen"
title="http://research.ibm.com/ontologies/hspo/fifteen_to_nineteen">15 to 19</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#twenty_to_twentyfour"
title="http://research.ibm.com/ontologies/hspo/twenty_to_twentyfour">20 to 24</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#twentyfive_to_twentynine"
title="http://research.ibm.com/ontologies/hspo/twentyfive_to_twentynine">25 to 29</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#thirty_to_thirtyfour"
title="http://research.ibm.com/ontologies/hspo/thirty_to_thirtyfour">30 to 34</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#thirtyfive_to_thirtynine"
title="http://research.ibm.com/ontologies/hspo/thirtyfive_to_thirtynine">35 to 39</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#forty_to_fortyfour"
title="http://research.ibm.com/ontologies/hspo/forty_to_fortyfour">40 to 44</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#fortyfive_to_fortynine"
title="http://research.ibm.com/ontologies/hspo/fortyfive_to_fortynine">45 to 49</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#five_to_nine"
title="http://research.ibm.com/ontologies/hspo/five_to_nine">5 to 9</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#fifty_to_fiftyfour"
title="http://research.ibm.com/ontologies/hspo/fifty_to_fiftyfour">50 to 54</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#fiftyfive_to_fiftynine"
title="http://research.ibm.com/ontologies/hspo/fiftyfive_to_fiftynine">55 to 59</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#sixty_to_sixtyfour"
title="http://research.ibm.com/ontologies/hspo/sixty_to_sixtyfour">60 to 64</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#sixtyfive_to_sixtynine"
title="http://research.ibm.com/ontologies/hspo/sixtyfive_to_sixtynine">65 to 69</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#seventy_to_seventyfour"
title="http://research.ibm.com/ontologies/hspo/seventy_to_seventyfour">70 to 74</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#seventyfive_to_seventynine"
title="http://research.ibm.com/ontologies/hspo/seventyfive_to_seventynine">75 to 79</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#eighty_to_eightyfour"
title="http://research.ibm.com/ontologies/hspo/eighty_to_eightyfour">80 to 84</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#eightyfive_and_over"
title="http://research.ibm.com/ontologies/hspo/eightyfive_and_over">85 and over</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#under_five"
title="http://research.ibm.com/ontologies/hspo/under_five">Under 5</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="AlignmentScore">
<h3>Alignment Score<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/AlignmentScore</p>
<div class="comment">
<span class="markdown">Alignment proximity score between the nodes of Evidence and Person Graphs</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#alignment_score_value"
title="http://research.ibm.com/ontologies/hspo/alignment_score_value">Alignment score value</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasAlignmentScore"
title="http://research.ibm.com/ontologies/hspo/hasAlignmentScore">hasAlignmentScore</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Behaviour">
<h3>Behaviour<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Behaviour</p>
<div class="comment">
<span class="markdown">Human behaviour, e.g. diet, smoking, exercising, sleep, etc.</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasBehaviour"
title="http://research.ibm.com/ontologies/hspo/hasBehaviour">hasBehaviour</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="BuiltEnvironment">
<h3>Built Environment<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/BuiltEnvironment</p>
<div class="comment">
<span class="markdown">The location surrounding an individual including neighborhood.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="ConfidenceScore">
<h3>Confidence Score<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/ConfidenceScore</p>
<div class="comment">
<span class="markdown">Confidence score includes alignment accuracy, probablity of an event and datasource trust score</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#hasAlignmentScore"
title="http://research.ibm.com/ontologies/hspo/hasAlignmentScore">hasAlignmentScore</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/hasProbabilityScore">hasProbabilityScore</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasTrustScore"
title="http://research.ibm.com/ontologies/hspo/hasTrustScore">hasTrustScore</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/hasConfidenceScore">hasConfidenceScore</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="DatasourceTrustScore">
<h3>Datasource Trust Score<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/DatasourceTrustScore</p>
<div class="comment">
<span class="markdown">Datasource trust score</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#trust_score"
title="http://research.ibm.com/ontologies/hspo/trust_score">Trust score</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasTrustScore"
title="http://research.ibm.com/ontologies/hspo/hasTrustScore">hasTrustScore</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Disease">
<h3>Disease<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Disease</p>
<dl class="description">
<dt>is equivalent to</dt>
<dd>
<a href="http://www.ebi.ac.uk/efo/EFO_0000408"
target="_blank"
title="http://www.ebi.ac.uk/efo/EFO_0000408">e f o 0000408</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasDisease"
title="http://research.ibm.com/ontologies/hspo/hasDisease">hasDisease</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Duration">
<h3>Duration<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Duration</p>
<div class="comment">
<span class="markdown">Duration of some action</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasDuration"
title="http://research.ibm.com/ontologies/hspo/hasDuration">hasDuration</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Educational">
<h3>Educational<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Educational</p>
<div class="comment">
<span class="markdown">The educational attainment and literacy of an individual.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Employment">
<h3>Employment<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Employment</p>
<div class="comment">
<span class="markdown">The labor context of an individual including unemployment.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Evidence">
<h3>Evidence<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Evidence</p>
<div class="comment">
<span class="markdown">Knowledge evidence</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="http://www.w3.org/ns/prov#Entity"
target="_blank"
title="http://www.w3.org/ns/prov#Entity">entity</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in domain of</dt>
<dd>
<a href="#hasConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/hasConfidenceScore">hasConfidenceScore</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceGraph">hasEvidenceGraph</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasEvidenceSource"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceSource">hasEvidenceSource</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasEvidence"
title="http://research.ibm.com/ontologies/hspo/hasEvidence">hasEvidence</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="EvidenceGraph">
<h3>Evidence Graph<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/EvidenceGraph</p>
<div class="comment">
<span class="markdown">The subgraph extracted from the source of evidences, for example using SPARQL CONSTRUCT query.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="http://www.w3.org/ns/prov#Activity"
target="_blank"
title="http://www.w3.org/ns/prov#Activity">activity</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in domain of</dt>
<dd>
<a href="#isPartOfEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/isPartOfEvidenceGraph">isPartOfEvidenceGraph</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceGraph">hasEvidenceGraph</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="EvidenceSource">
<h3>Evidence Source<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/EvidenceSource</p>
<div class="comment">
<span class="markdown">The source of the evidence</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="http://www.w3.org/ns/prov#Entity"
target="_blank"
title="http://www.w3.org/ns/prov#Entity">entity</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in domain of</dt>
<dd>
<a href="#source_ID"
title="http://research.ibm.com/ontologies/hspo/source_ID">Datasource ID</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasEvidenceSource"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceSource">hasEvidenceSource</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Financial">
<h3>Financial<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Financial</p>
<div class="comment">
<span class="markdown">The financial context of an individual including economic stability, material hardship and medical cost burden.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Food">
<h3>Food Security<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Food</p>
<div class="comment">
<span class="markdown">The context in which an individual consumes or has access to food including nutritious or fresh foods and food poverty. </span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Gender">
<h3>Gender<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Gender</p>
<div class="comment">
<span class="markdown">The gender of a person</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasGender"
title="http://research.ibm.com/ontologies/hspo/hasGender">hasGender</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#feminine_gender"
title="http://research.ibm.com/ontologies/hspo/feminine_gender">Feminine gender</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#gender_unknown"
title="http://research.ibm.com/ontologies/hspo/gender_unknown">Gender unknown</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#gender_unspecified"
title="http://research.ibm.com/ontologies/hspo/gender_unspecified">Gender unspecified</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#masculine_gender"
title="http://research.ibm.com/ontologies/hspo/masculine_gender">Masculine gender</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#non_binary_gender"
title="http://research.ibm.com/ontologies/hspo/non_binary_gender">Non-binary gender</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#transgender_female_to_male"
title="http://research.ibm.com/ontologies/hspo/transgender_female_to_male">Surgically transgendered transsexual, female-to-male</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#transgender_male_to_female"
title="http://research.ibm.com/ontologies/hspo/transgender_male_to_female">Surgically transgendered transsexual, male-to-female</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#transgender"
title="http://research.ibm.com/ontologies/hspo/transgender">Transgender</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="HealthAndWelfare">
<h3>Health and Welfare System<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/HealthAndWelfare</p>
<div class="comment">
<span class="markdown">The context and environment in which healthcare or social welfare are provided including access to services.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Homelessness">
<h3>Homelessness<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Homelessness</p>
<div class="comment">
<span class="markdown">Housing Subategory: Homelessness</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Household">
<h3>Household Composition<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Household</p>
<div class="comment">
<span class="markdown">The household composition</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterpersonalSocialAndCommunityEnvironment"
title="http://research.ibm.com/ontologies/hspo/InterpersonalSocialAndCommunityEnvironment">Interpersonal, Social and Community Environment</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in domain of</dt>
<dd>
<a href="#number_in_household"
title="http://research.ibm.com/ontologies/hspo/number_in_household">Number in household</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#child_lives_with_unrelated_adult"
title="http://research.ibm.com/ontologies/hspo/child_lives_with_unrelated_adult">Child lives with unrelated adult</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#divorced_couple_sharing_house"
title="http://research.ibm.com/ontologies/hspo/divorced_couple_sharing_house">Divorced couple sharing house</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#elderly_relative_lives_with_family"
title="http://research.ibm.com/ontologies/hspo/elderly_relative_lives_with_family">Elderly relative lives with family</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_alone"
title="http://research.ibm.com/ontologies/hspo/lives_alone">Lives alone</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_alone_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_help_available">Lives alone, help available</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_alone_needs_housekeeper"
title="http://research.ibm.com/ontologies/hspo/lives_alone_needs_housekeeper">Lives alone, needs housekeeper</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_alone_no_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_no_help_available">Lives alone, no help available</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_as_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_companion">Lives as companion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_as_paid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_paid_companion">Lives as paid companion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_as_unpaid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_unpaid_companion">Lives as unpaid companion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_in_a_commune"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_commune">Lives in a commune</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_in_a_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_community">Lives in a community</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_in_a_school_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_school_community">Lives in a school community</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_in_boarding_school"
title="http://research.ibm.com/ontologies/hspo/lives_in_boarding_school">Lives in boarding school</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_children"
title="http://research.ibm.com/ontologies/hspo/lives_with_children">Lives with children</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_companion"
title="http://research.ibm.com/ontologies/hspo/lives_with_companion">Lives with companion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_daughter"
title="http://research.ibm.com/ontologies/hspo/lives_with_daughter">Lives with daughter</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_family"
title="http://research.ibm.com/ontologies/hspo/lives_with_family">Lives with family</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_father"
title="http://research.ibm.com/ontologies/hspo/lives_with_father">Lives with father</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_friends"
title="http://research.ibm.com/ontologies/hspo/lives_with_friends">Lives with friends</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_grandfather"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandfather">Lives with grandfather</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_grandmother"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandmother">Lives with grandmother</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_grandparents"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandparents">Lives with grandparents</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_husband"
title="http://research.ibm.com/ontologies/hspo/lives_with_husband">Lives with husband</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_lodger"
title="http://research.ibm.com/ontologies/hspo/lives_with_lodger">Lives with lodger</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_mother"
title="http://research.ibm.com/ontologies/hspo/lives_with_mother">Lives with mother</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_parents"
title="http://research.ibm.com/ontologies/hspo/lives_with_parents">Lives with parents</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_partner"
title="http://research.ibm.com/ontologies/hspo/lives_with_partner">Lives with partner</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_roommate"
title="http://research.ibm.com/ontologies/hspo/lives_with_roommate">Lives with roommate</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_son"
title="http://research.ibm.com/ontologies/hspo/lives_with_son">Lives with son</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_spouse"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse">Lives with spouse</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_spouse_only"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse_only">Lives with spouse only</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lives_with_wife"
title="http://research.ibm.com/ontologies/hspo/lives_with_wife">Lives with wife</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#living_temporarily_with_relatives"
title="http://research.ibm.com/ontologies/hspo/living_temporarily_with_relatives">Living temporarily with relatives</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="HouseholdCrowding">
<h3>Household Crowding<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/HouseholdCrowding</p>
<div class="comment">
<span class="markdown">Housing Subategory: Household space and crowding</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Housing">
<h3>Housing<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Housing</p>
<div class="comment">
<span class="markdown">The physical environment context in which an individual finds shelter and/or resides, including access to computer.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has sub-classes</dt>
<dd>
<a href="#Homelessness"
title="http://research.ibm.com/ontologies/hspo/Homelessness">Homelessness</a>
<sup class="type-c" title="class">c</sup>, <a href="#HouseholdCrowding"
title="http://research.ibm.com/ontologies/hspo/HouseholdCrowding">Household Crowding</a>
<sup class="type-c" title="class">c</sup>, <a href="#HousingStability"
title="http://research.ibm.com/ontologies/hspo/HousingStability">Housing Stability</a>
<sup class="type-c" title="class">c</sup>, <a href="#LivingConditions"
title="http://research.ibm.com/ontologies/hspo/LivingConditions">Living Conditions</a>
<sup class="type-c" title="class">c</sup>, <a href="#HousingProblemUnspecified"
title="http://research.ibm.com/ontologies/hspo/HousingProblemUnspecified">Unspecified Housing Problem</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="HousingStability">
<h3>Housing Stability<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/HousingStability</p>
<div class="comment">
<span class="markdown">Housing Subategory: Housing stability or instability</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterpersonalSocialAndCommunityEnvironment">
<h3>Interpersonal, Social and Community Environment<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterpersonalSocialAndCommunityEnvironment</p>
<div class="comment">
<span class="markdown">The social environment context of an individual including interpersonal relationships, community and culture.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has sub-classes</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Intervention">
<h3>Intervention<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Intervention</p>
<div class="comment">
<span class="markdown">An intervention for the person.</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#intervention_code"
title="http://research.ibm.com/ontologies/hspo/intervention_code">Intervention code</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#intervention_code_system"
title="http://research.ibm.com/ontologies/hspo/intervention_code_system">Intervention code system</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#intervention_name"
title="http://research.ibm.com/ontologies/hspo/intervention_name">Intervention name</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#hasDuration"
title="http://research.ibm.com/ontologies/hspo/hasDuration">hasDuration</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcome">hasInterventionOutcome</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionProvider"
title="http://research.ibm.com/ontologies/hspo/hasInterventionProvider">hasInterventionProvider</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionStatus"
title="http://research.ibm.com/ontologies/hspo/hasInterventionStatus">hasInterventionStatus</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionType">hasInterventionType</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasIntervention"
title="http://research.ibm.com/ontologies/hspo/hasIntervention">hasIntervention</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByAssessment">
<h3>Intervention by Assessment<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByAssessment</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByAssistance">
<h3>Intervention by Assistance<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByAssistance</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByCoordination">
<h3>Intervention by Coordination<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByCoordination</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByCounseling">
<h3>Intervention by Counseling<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByCounseling</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByEducation">
<h3>Intervention by Education<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByEducation</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByEvaluationOfEligibility">
<h3>Intervention by Evaluation of Eligibility<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByEvaluationOfEligibility</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByProvisioning">
<h3>Intervention by Provisioning<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByProvisioning</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#medication_provisioning"
title="http://research.ibm.com/ontologies/hspo/medication_provisioning">Intervention by provisioning a medication</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#procedure_provisioning"
title="http://research.ibm.com/ontologies/hspo/procedure_provisioning">Intervention by provisioning a procedure</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#social_action_provisioning"
title="http://research.ibm.com/ontologies/hspo/social_action_provisioning">Intervention by provisioning a social action</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionByReffering">
<h3>Intervention by Referral<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionByReffering</p>
<div class="comment">
<span class="markdown"/>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionOutcome">
<h3>Intervention Outcome<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionOutcome</p>
<div class="comment">
<span class="markdown">The outcome of an intervention.</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#hasInterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeMetric">hasInterventionOutcomeMetric</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeResult">hasInterventionOutcomeResult</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasInterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeType">hasInterventionOutcomeType</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcome">hasInterventionOutcome</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionOutcomeMetric">
<h3>Intervention Outcome Metric<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionOutcomeMetric</p>
<div class="comment">
<span class="markdown">Specific metric of an intervention outcome</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeMetric">hasInterventionOutcomeMetric</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionOutcomeResult">
<h3>Intervention Outcome Result<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionOutcomeResult</p>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeResult">hasInterventionOutcomeResult</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionOutcomeType">
<h3>Intervention Outcome Type<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionOutcomeType</p>
<div class="comment">
<span class="markdown">The type of intervention outcome</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeType">hasInterventionOutcomeType</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionProvider">
<h3>Intervention Provider<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionProvider</p>
<div class="comment">
<span class="markdown">The provider of an intervention</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionProvider"
title="http://research.ibm.com/ontologies/hspo/hasInterventionProvider">hasInterventionProvider</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionStatus">
<h3>Intervention Status<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionStatus</p>
<div class="comment">
<span class="markdown">The status of an intervention, for example, applied, recommended, planned, ongoing, available, etc.</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionStatus"
title="http://research.ibm.com/ontologies/hspo/hasInterventionStatus">hasInterventionStatus</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#applied_intervention"
title="http://research.ibm.com/ontologies/hspo/applied_intervention">Applied intervention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#available_intervention"
title="http://research.ibm.com/ontologies/hspo/available_intervention">Available intervention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#ongoing_intervention"
title="http://research.ibm.com/ontologies/hspo/ongoing_intervention">Ongoing intervention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#planned_intervention"
title="http://research.ibm.com/ontologies/hspo/planned_intervention">Planned intervention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#recommended_intervention"
title="http://research.ibm.com/ontologies/hspo/recommended_intervention">Recommended intervention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#rejected_intervention"
title="http://research.ibm.com/ontologies/hspo/rejected_intervention">Rejected intervention</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="InterventionType">
<h3>Intervention Type<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/InterventionType</p>
<div class="comment">
<span class="markdown">A type of intervention. E.g. education, assessment, assistance, coordination, counseling, provision, referral</span>
</div>
<dl class="description">
<dt>has sub-classes</dt>
<dd>
<a href="#InterventionByAssessment"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssessment">Intervention by Assessment</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByAssistance"
title="http://research.ibm.com/ontologies/hspo/InterventionByAssistance">Intervention by Assistance</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByCoordination"
title="http://research.ibm.com/ontologies/hspo/InterventionByCoordination">Intervention by Coordination</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByCounseling"
title="http://research.ibm.com/ontologies/hspo/InterventionByCounseling">Intervention by Counseling</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByEducation"
title="http://research.ibm.com/ontologies/hspo/InterventionByEducation">Intervention by Education</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByEvaluationOfEligibility"
title="http://research.ibm.com/ontologies/hspo/InterventionByEvaluationOfEligibility">Intervention by Evaluation of Eligibility</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterventionByReffering"
title="http://research.ibm.com/ontologies/hspo/InterventionByReffering">Intervention by Referral</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasInterventionType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionType">hasInterventionType</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Judicial">
<h3>Judicial<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Judicial</p>
<div class="comment">
<span class="markdown">The judicial context of an individual including imprisionment, involvement in legal actions or jury duty.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="LivingConditions">
<h3>Living Conditions<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/LivingConditions</p>
<div class="comment">
<span class="markdown">Housing Subategory: Quality of living conditions</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="Location">
<h3>Location<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Location</p>
<div class="comment">
<span class="markdown">The location oe setting where a person lives</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#lives" title="http://research.ibm.com/ontologies/hspo/lives">lives</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="MaritalStatus">
<h3>Marital Status<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/MaritalStatus</p>
<div class="comment">
<span class="markdown">The marital status of a person</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasMaritalStatus"
title="http://research.ibm.com/ontologies/hspo/hasMaritalStatus">hasMaritalStatus</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#bachelor"
title="http://research.ibm.com/ontologies/hspo/bachelor">Bachelor</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#broken_engagement"
title="http://research.ibm.com/ontologies/hspo/broken_engagement">Broken engagement</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#broken_with_partner"
title="http://research.ibm.com/ontologies/hspo/broken_with_partner">Broken with partner</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#cohabitee_left_home"
title="http://research.ibm.com/ontologies/hspo/cohabitee_left_home">Cohabitee left home</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#cohabiting"
title="http://research.ibm.com/ontologies/hspo/cohabiting">Cohabiting</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#common_law_partnership"
title="http://research.ibm.com/ontologies/hspo/common_law_partnership">Common law partnership</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#divorced"
title="http://research.ibm.com/ontologies/hspo/divorced">Divorced</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#domestic_partnership"
title="http://research.ibm.com/ontologies/hspo/domestic_partnership">Domestic partnership</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#eloped" title="http://research.ibm.com/ontologies/hspo/eloped">Eloped</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#engaged_to_be_married"
title="http://research.ibm.com/ontologies/hspo/engaged_to_be_married">Engaged to be married</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#homosexual_marriage"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage">Homosexual marriage</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#homosexual_marriage_female"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_female">Homosexual marriage, female</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#homosexual_marriage_male"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_male">Homosexual marriage, male</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#husband_left_home"
title="http://research.ibm.com/ontologies/hspo/husband_left_home">Husband left home</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#legally_separated_with_interlocutory_decree"
title="http://research.ibm.com/ontologies/hspo/legally_separated_with_interlocutory_decree">Legally separated with interlocutory decree</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#marital_state_unknown"
title="http://research.ibm.com/ontologies/hspo/marital_state_unknown">Marital state unknown</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#marriage_annulment"
title="http://research.ibm.com/ontologies/hspo/marriage_annulment">Marriage annulment</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#married" title="http://research.ibm.com/ontologies/hspo/married">Married</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#monogamous"
title="http://research.ibm.com/ontologies/hspo/monogamous">Monogamous</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#newly_wed"
title="http://research.ibm.com/ontologies/hspo/newly_wed">Newly wed</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#polygamous"
title="http://research.ibm.com/ontologies/hspo/polygamous">Polygamous</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#purposely_unmarried_and_sexually_abstinent"
title="http://research.ibm.com/ontologies/hspo/purposely_unmarried_and_sexually_abstinent">Purposely unmarried and sexually abstinent</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#remarried"
title="http://research.ibm.com/ontologies/hspo/remarried">Remarried</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#separated"
title="http://research.ibm.com/ontologies/hspo/separated">Separated</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#separated_from_cohabitee"
title="http://research.ibm.com/ontologies/hspo/separated_from_cohabitee">Separated from cohabitee</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#single_person"
title="http://research.ibm.com/ontologies/hspo/single_person">Single person</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#single_never_married"
title="http://research.ibm.com/ontologies/hspo/single_never_married">Single, never married</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#spinster"
title="http://research.ibm.com/ontologies/hspo/spinster">Spinster</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#spouse_left_home"
title="http://research.ibm.com/ontologies/hspo/spouse_left_home">Spouse left home</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#trial_separation"
title="http://research.ibm.com/ontologies/hspo/trial_separation">Trial separation</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#widow" title="http://research.ibm.com/ontologies/hspo/widow">Widow</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#widowed" title="http://research.ibm.com/ontologies/hspo/widowed">Widowed</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#widower" title="http://research.ibm.com/ontologies/hspo/widower">Widower</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#wife_left_home"
title="http://research.ibm.com/ontologies/hspo/wife_left_home">Wife left home</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="OriginalProbabilityScore">
<h3>Original Probability Score<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore</p>
<div class="comment">
<span class="markdown">Probability score of the evidence</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#probability_score_metric"
title="http://research.ibm.com/ontologies/hspo/probability_score_metric">Probability score metric</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#probability_score_value"
title="http://research.ibm.com/ontologies/hspo/probability_score_value">Probability score value</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/hasProbabilityScore">hasProbabilityScore</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Person">
<h3>Person<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Person</p>
<div class="comment">
<span class="markdown">A person.</span>
</div>
<dl class="description">
<dt>is in domain of</dt>
<dd>
<a href="#person_id"
title="http://research.ibm.com/ontologies/hspo/person_id">Person ID</a>
<sup class="type-dp" title="data property">dp</sup>, <a href="#followsReligion"
title="http://research.ibm.com/ontologies/hspo/followsReligion">followsReligion</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasAge" title="http://research.ibm.com/ontologies/hspo/hasAge">hasAge</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasBehaviour"
title="http://research.ibm.com/ontologies/hspo/hasBehaviour">hasBehaviour</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasDisease"
title="http://research.ibm.com/ontologies/hspo/hasDisease">hasDisease</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasGender"
title="http://research.ibm.com/ontologies/hspo/hasGender">hasGender</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasIntervention"
title="http://research.ibm.com/ontologies/hspo/hasIntervention">hasIntervention</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasMaritalStatus"
title="http://research.ibm.com/ontologies/hspo/hasMaritalStatus">hasMaritalStatus</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasRaceOrEthnicity"
title="http://research.ibm.com/ontologies/hspo/hasRaceOrEthnicity">hasRaceOrEthnicity</a>
<sup class="type-op" title="object property">op</sup>, <a href="#hasSocialContext"
title="http://research.ibm.com/ontologies/hspo/hasSocialContext">hasSocialContext</a>
<sup class="type-op" title="object property">op</sup>, <a href="#lives" title="http://research.ibm.com/ontologies/hspo/lives">lives</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="Political">
<h3>Political<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Political</p>
<div class="comment">
<span class="markdown">The political and government context of an individual including political affiliations and distrust in government institutions.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="RaceAndEthnicity">
<h3>Race and Ethnicity<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/RaceAndEthnicity</p>
<div class="comment">
<span class="markdown">The race and/or ethnicity of a person</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasRaceOrEthnicity"
title="http://research.ibm.com/ontologies/hspo/hasRaceOrEthnicity">hasRaceOrEthnicity</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#african_race"
title="http://research.ibm.com/ontologies/hspo/african_race">African race</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#american_indian_or_alaska_native"
title="http://research.ibm.com/ontologies/hspo/american_indian_or_alaska_native">American Indian or Alaska native</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#asian_or_pacific_islander"
title="http://research.ibm.com/ontologies/hspo/asian_or_pacific_islander">Asian or Pacific islander</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#australian_aborigine"
title="http://research.ibm.com/ontologies/hspo/australian_aborigine">Australian aborigine</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#caucasian"
title="http://research.ibm.com/ontologies/hspo/caucasian">Caucasian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#hispanic"
title="http://research.ibm.com/ontologies/hspo/hispanic">Hispanic</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#indian" title="http://research.ibm.com/ontologies/hspo/indian">Indian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#race_not_stated"
title="http://research.ibm.com/ontologies/hspo/race_not_stated">Race not stated</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#race_unknown"
title="http://research.ibm.com/ontologies/hspo/race_unknown">Unknown racial group</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="Religion">
<h3>Religion<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Religion</p>
<div class="comment">
<span class="markdown">The religion of a person</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#followsReligion"
title="http://research.ibm.com/ontologies/hspo/followsReligion">followsReligion</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#agnosticism"
title="http://research.ibm.com/ontologies/hspo/agnosticism">Agnosticism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#atheism" title="http://research.ibm.com/ontologies/hspo/atheism">Atheism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#bahai" title="http://research.ibm.com/ontologies/hspo/bahai">Baha'i Faith</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#buddhism"
title="http://research.ibm.com/ontologies/hspo/buddhism">Buddhism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#mahayana"
title="http://research.ibm.com/ontologies/hspo/mahayana">Buddhism: Mahayana</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#buddhism_other"
title="http://research.ibm.com/ontologies/hspo/buddhism_other">Buddhism: Other</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#tantrayana"
title="http://research.ibm.com/ontologies/hspo/tantrayana">Buddhism: Tantrayana</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#theravada"
title="http://research.ibm.com/ontologies/hspo/theravada">Buddhism: Theravada</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#chinese_folk_religion"
title="http://research.ibm.com/ontologies/hspo/chinese_folk_religion">Chinese Folk Religion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#christian"
title="http://research.ibm.com/ontologies/hspo/christian">Christian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#african_methodist_episcopal"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal">Christian: African Methodist Episcopal</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#african_methodist_episcopal_zion"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal_zion">Christian: African Methodist Episcopal Zion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#american_baptist_church"
title="http://research.ibm.com/ontologies/hspo/american_baptist_church">Christian: American Baptist Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#anglican"
title="http://research.ibm.com/ontologies/hspo/anglican">Christian: Anglican</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#assembly_of_god"
title="http://research.ibm.com/ontologies/hspo/assembly_of_god">Christian: Assembly of God</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#aptist_church"
title="http://research.ibm.com/ontologies/hspo/aptist_church">Christian: Baptist Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#christian_missionary_alliance"
title="http://research.ibm.com/ontologies/hspo/christian_missionary_alliance">Christian: Christian Missionary Alliance</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#christian_reformed"
title="http://research.ibm.com/ontologies/hspo/christian_reformed">Christian: Christian Reformed</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#christian_science"
title="http://research.ibm.com/ontologies/hspo/christian_science">Christian: Christian Science Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#church_of_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_christ">Christian: Church of Christ</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#church_of_god"
title="http://research.ibm.com/ontologies/hspo/church_of_god">Christian: Church of God</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#church_of_god_in_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_god_in_christ">Christian: Church of God in Christ</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#church_of_the_nazarene"
title="http://research.ibm.com/ontologies/hspo/church_of_the_nazarene">Christian: Church of the Nazarene</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#community_church"
title="http://research.ibm.com/ontologies/hspo/community_church">Christian: Community Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#congregational_church"
title="http://research.ibm.com/ontologies/hspo/congregational_church">Christian: Congregational</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#eastern_orthodox"
title="http://research.ibm.com/ontologies/hspo/eastern_orthodox">Christian: Eastern Orthodox</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#episcopalian"
title="http://research.ibm.com/ontologies/hspo/episcopalian">Christian: Episcopalian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#evangelical_church"
title="http://research.ibm.com/ontologies/hspo/evangelical_church">Christian: Evangelical Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#free_will_baptist"
title="http://research.ibm.com/ontologies/hspo/free_will_baptist">Christian: Free Will Baptist</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#friends_church"
title="http://research.ibm.com/ontologies/hspo/friends_church">Christian: Friends Church or Quakers</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#greek_orthodox"
title="http://research.ibm.com/ontologies/hspo/greek_orthodox">Christian: Greek Orthodox</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#jehovahs_witness"
title="http://research.ibm.com/ontologies/hspo/jehovahs_witness">Christian: Jehovahs Witness</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#latter_day_saints_church"
title="http://research.ibm.com/ontologies/hspo/latter_day_saints_church">Christian: Latter-day Saints</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lutheran"
title="http://research.ibm.com/ontologies/hspo/lutheran">Christian: Lutheran</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#lutheran_missouri_synod"
title="http://research.ibm.com/ontologies/hspo/lutheran_missouri_synod">Christian: Lutheran Missouri Synod</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#mennonite"
title="http://research.ibm.com/ontologies/hspo/mennonite">Christian: Mennonite</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#methodist"
title="http://research.ibm.com/ontologies/hspo/methodist">Christian: Methodist</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#orthodox"
title="http://research.ibm.com/ontologies/hspo/orthodox">Christian: Orthodox</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#christian_other"
title="http://research.ibm.com/ontologies/hspo/christian_other">Christian: Other</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#other_pentecostal"
title="http://research.ibm.com/ontologies/hspo/other_pentecostal">Christian: Other Pentecostal</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#other_protestant"
title="http://research.ibm.com/ontologies/hspo/other_protestant">Christian: Other Protestant</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#pentecostal"
title="http://research.ibm.com/ontologies/hspo/pentecostal">Christian: Pentecostal</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#presbyterian"
title="http://research.ibm.com/ontologies/hspo/presbyterian">Christian: Presbyterian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#protestant"
title="http://research.ibm.com/ontologies/hspo/protestant">Christian: Protestant</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#reformed_church"
title="http://research.ibm.com/ontologies/hspo/reformed_church">Christian: Reformed Church</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#rlds" title="http://research.ibm.com/ontologies/hspo/rlds">Christian: Reorganized Church of Jesus Christ of LDS</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#roman_catholic"
title="http://research.ibm.com/ontologies/hspo/roman_catholic">Christian: Roman Catholic</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#salvation_army"
title="http://research.ibm.com/ontologies/hspo/salvation_army">Christian: Salvation Army</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#seventh_day_adventist"
title="http://research.ibm.com/ontologies/hspo/seventh_day_adventist">Christian: Seventh Day Adventist</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#southern_baptist"
title="http://research.ibm.com/ontologies/hspo/southern_baptist">Christian: Southern Baptist Convention</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#unitarian"
title="http://research.ibm.com/ontologies/hspo/unitarian">Christian: Unitarian</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#unitarian_universalism"
title="http://research.ibm.com/ontologies/hspo/unitarian_universalism">Christian: Unitarian Universalism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#united_church_of_christ"
title="http://research.ibm.com/ontologies/hspo/united_church_of_christ">Christian: United Church of Christ</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#united_methodist"
title="http://research.ibm.com/ontologies/hspo/united_methodist">Christian: United Methodist</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#wesleyan"
title="http://research.ibm.com/ontologies/hspo/wesleyan">Christian: Wesleyan</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#confucianism"
title="http://research.ibm.com/ontologies/hspo/confucianism">Confucianism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#ethnic_religion"
title="http://research.ibm.com/ontologies/hspo/ethnic_religion">Ethnic Religion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#hinduism"
title="http://research.ibm.com/ontologies/hspo/hinduism">Hinduism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#hinduism_other"
title="http://research.ibm.com/ontologies/hspo/hinduism_other">Hinduism: Other</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#shaivism"
title="http://research.ibm.com/ontologies/hspo/shaivism">Hinduism: Shaivism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#vaishnavism"
title="http://research.ibm.com/ontologies/hspo/vaishnavism">Hinduism: Vaishnavism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#jainism" title="http://research.ibm.com/ontologies/hspo/jainism">Jainism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#judaism" title="http://research.ibm.com/ontologies/hspo/judaism">Judaism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#conservative_judaism"
title="http://research.ibm.com/ontologies/hspo/conservative_judaism">Judaism: Conservative Judaism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#jewish_renewal"
title="http://research.ibm.com/ontologies/hspo/jewish_renewal">Judaism: Jewish Renewal</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#orthodox_judaism"
title="http://research.ibm.com/ontologies/hspo/orthodox_judaism">Judaism: Orthodox Judaism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#judaism_other"
title="http://research.ibm.com/ontologies/hspo/judaism_other">Judaism: Other</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#reconstructionist_judaism"
title="http://research.ibm.com/ontologies/hspo/reconstructionist_judaism">Judaism: Reconstructionist Judaism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#reform_judaism"
title="http://research.ibm.com/ontologies/hspo/reform_judaism">Judaism: Reform Judaism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#muslim" title="http://research.ibm.com/ontologies/hspo/muslim">Muslim</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#muslim_other"
title="http://research.ibm.com/ontologies/hspo/muslim_other">Muslim: Other</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#shia_islam"
title="http://research.ibm.com/ontologies/hspo/shia_islam">Muslim: Shia Islam</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#sunni_islam"
title="http://research.ibm.com/ontologies/hspo/sunni_islam">Muslim: Sunni Islam</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#native_american"
title="http://research.ibm.com/ontologies/hspo/native_american">Native American</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#new_religion"
title="http://research.ibm.com/ontologies/hspo/new_religion">New Religion Movement</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#nonreligious"
title="http://research.ibm.com/ontologies/hspo/nonreligious">Non religious</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#other_religion"
title="http://research.ibm.com/ontologies/hspo/other_religion">Other religion</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#religion_unknown"
title="http://research.ibm.com/ontologies/hspo/religion_unknown">Religion is unknown</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#shinto" title="http://research.ibm.com/ontologies/hspo/shinto">Shinto or Shintoism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#sikhism" title="http://research.ibm.com/ontologies/hspo/sikhism">Sikhism</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#spiritualism"
title="http://research.ibm.com/ontologies/hspo/spiritualism">Spiritualism</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="SocialContext">
<h3>Social Context<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/SocialContext</p>
<div class="comment">
<span class="markdown">Social context of a person, e.g. problem, state, strength, barriers, etc.</span>
</div>
<dl class="description">
<dt>has sub-classes</dt>
<dd>
<a href="#BuiltEnvironment"
title="http://research.ibm.com/ontologies/hspo/BuiltEnvironment">Built Environment</a>
<sup class="type-c" title="class">c</sup>, <a href="#Educational"
title="http://research.ibm.com/ontologies/hspo/Educational">Educational</a>
<sup class="type-c" title="class">c</sup>, <a href="#Employment"
title="http://research.ibm.com/ontologies/hspo/Employment">Employment</a>
<sup class="type-c" title="class">c</sup>, <a href="#Financial"
title="http://research.ibm.com/ontologies/hspo/Financial">Financial</a>
<sup class="type-c" title="class">c</sup>, <a href="#Food" title="http://research.ibm.com/ontologies/hspo/Food">Food Security</a>
<sup class="type-c" title="class">c</sup>, <a href="#HealthAndWelfare"
title="http://research.ibm.com/ontologies/hspo/HealthAndWelfare">Health and Welfare System</a>
<sup class="type-c" title="class">c</sup>, <a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>, <a href="#InterpersonalSocialAndCommunityEnvironment"
title="http://research.ibm.com/ontologies/hspo/InterpersonalSocialAndCommunityEnvironment">Interpersonal, Social and Community Environment</a>
<sup class="type-c" title="class">c</sup>, <a href="#Judicial"
title="http://research.ibm.com/ontologies/hspo/Judicial">Judicial</a>
<sup class="type-c" title="class">c</sup>, <a href="#Political"
title="http://research.ibm.com/ontologies/hspo/Political">Political</a>
<sup class="type-c" title="class">c</sup>, <a href="#Transportation"
title="http://research.ibm.com/ontologies/hspo/Transportation">Transportation</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>is in domain of</dt>
<dd>
<a href="#positivity_indicator"
title="http://research.ibm.com/ontologies/hspo/positivity_indicator">Positivity indicator</a>
<sup class="type-dp" title="data property">dp</sup>
</dd>
<dt>is in range of</dt>
<dd>
<a href="#hasSocialContext"
title="http://research.ibm.com/ontologies/hspo/hasSocialContext">hasSocialContext</a>
<sup class="type-op" title="object property">op</sup>
</dd>
</dl>
</div>
<div class="entity" id="StageOfLife">
<h3>Stage of life<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/StageOfLife</p>
<div class="comment">
<span class="markdown">The stage of life of a person</span>
</div>
<dl class="description">
<dt>is in range of</dt>
<dd>
<a href="#hasStageOfLife"
title="http://research.ibm.com/ontologies/hspo/hasStageOfLife">hasStageOfLife</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has members</dt>
<dd>
<a href="#adult" title="http://research.ibm.com/ontologies/hspo/adult">Adult</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#child" title="http://research.ibm.com/ontologies/hspo/child">Child</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#infant" title="http://research.ibm.com/ontologies/hspo/infant">Infant</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#middle_age_adult"
title="http://research.ibm.com/ontologies/hspo/middle_age_adult">Middle age adult</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#senior_adult"
title="http://research.ibm.com/ontologies/hspo/senior_adult">Senior Adult</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#teen" title="http://research.ibm.com/ontologies/hspo/teen">Teenager</a>
<sup class="type-ni" title="named individual">ni</sup>, <a href="#toddler" title="http://research.ibm.com/ontologies/hspo/toddler">Toddler</a>
<sup class="type-ni" title="named individual">ni</sup>
</dd>
</dl>
</div>
<div class="entity" id="Transportation">
<h3>Transportation<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/Transportation</p>
<div class="comment">
<span class="markdown">The context in which an individual requires to travel between locations including commuting.</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="HousingProblemUnspecified">
<h3>Unspecified Housing Problem<sup class="type-c" title="class">c</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#classes">Class ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/HousingProblemUnspecified</p>
<div class="comment">
<span class="markdown">Housing Subategory: HousingProblem details not specified</span>
</div>
<dl class="description">
<dt>has super-classes</dt>
<dd>
<a href="#Housing" title="http://research.ibm.com/ontologies/hspo/Housing">Housing</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div><div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="objectproperties">
<h3 id="properties" class="list">Object Properties</h3>
<ul class="hlist">
<li>
<a href="#belongsToAgeGroup"
title="http://research.ibm.com/ontologies/hspo/belongsToAgeGroup">belongsToAgeGroup</a>
</li>
<li>
<a href="#followsReligion"
title="http://research.ibm.com/ontologies/hspo/followsReligion">followsReligion</a>
</li>
<li>
<a href="#hasAge" title="http://research.ibm.com/ontologies/hspo/hasAge">hasAge</a>
</li>
<li>
<a href="#hasAlignmentScore"
title="http://research.ibm.com/ontologies/hspo/hasAlignmentScore">hasAlignmentScore</a>
</li>
<li>
<a href="#hasBehaviour"
title="http://research.ibm.com/ontologies/hspo/hasBehaviour">hasBehaviour</a>
</li>
<li>
<a href="#hasConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/hasConfidenceScore">hasConfidenceScore</a>
</li>
<li>
<a href="#hasDisease"
title="http://research.ibm.com/ontologies/hspo/hasDisease">hasDisease</a>
</li>
<li>
<a href="#hasDuration"
title="http://research.ibm.com/ontologies/hspo/hasDuration">hasDuration</a>
</li>
<li>
<a href="#hasEvidence"
title="http://research.ibm.com/ontologies/hspo/hasEvidence">hasEvidence</a>
</li>
<li>
<a href="#hasEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceGraph">hasEvidenceGraph</a>
</li>
<li>
<a href="#hasEvidenceSource"
title="http://research.ibm.com/ontologies/hspo/hasEvidenceSource">hasEvidenceSource</a>
</li>
<li>
<a href="#hasGender"
title="http://research.ibm.com/ontologies/hspo/hasGender">hasGender</a>
</li>
<li>
<a href="#hasIntervention"
title="http://research.ibm.com/ontologies/hspo/hasIntervention">hasIntervention</a>
</li>
<li>
<a href="#hasInterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcome">hasInterventionOutcome</a>
</li>
<li>
<a href="#hasInterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeMetric">hasInterventionOutcomeMetric</a>
</li>
<li>
<a href="#hasInterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeResult">hasInterventionOutcomeResult</a>
</li>
<li>
<a href="#hasInterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeType">hasInterventionOutcomeType</a>
</li>
<li>
<a href="#hasInterventionProvider"
title="http://research.ibm.com/ontologies/hspo/hasInterventionProvider">hasInterventionProvider</a>
</li>
<li>
<a href="#hasInterventionStatus"
title="http://research.ibm.com/ontologies/hspo/hasInterventionStatus">hasInterventionStatus</a>
</li>
<li>
<a href="#hasInterventionType"
title="http://research.ibm.com/ontologies/hspo/hasInterventionType">hasInterventionType</a>
</li>
<li>
<a href="#hasMaritalStatus"
title="http://research.ibm.com/ontologies/hspo/hasMaritalStatus">hasMaritalStatus</a>
</li>
<li>
<a href="#hasProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/hasProbabilityScore">hasProbabilityScore</a>
</li>
<li>
<a href="#hasRaceOrEthnicity"
title="http://research.ibm.com/ontologies/hspo/hasRaceOrEthnicity">hasRaceOrEthnicity</a>
</li>
<li>
<a href="#hasSocialContext"
title="http://research.ibm.com/ontologies/hspo/hasSocialContext">hasSocialContext</a>
</li>
<li>
<a href="#hasStageOfLife"
title="http://research.ibm.com/ontologies/hspo/hasStageOfLife">hasStageOfLife</a>
</li>
<li>
<a href="#hasTrustScore"
title="http://research.ibm.com/ontologies/hspo/hasTrustScore">hasTrustScore</a>
</li>
<li>
<a href="#isPartOfEvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/isPartOfEvidenceGraph">isPartOfEvidenceGraph</a>
</li>
<li>
<a href="#lives" title="http://research.ibm.com/ontologies/hspo/lives">lives</a>
</li>
</ul>
<div class="entity" id="belongsToAgeGroup">
<h3>belongsToAgeGroup<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/belongsToAgeGroup</p>
<div class="comment">
<span class="markdown">The age group the person belongs to</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="followsReligion">
<h3>followsReligion<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/followsReligion</p>
<div class="comment">
<span class="markdown">The religon a person follows</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasAge">
<h3>hasAge<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasAge</p>
<div class="comment">
<span class="markdown">The age of a person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasAlignmentScore">
<h3>hasAlignmentScore<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasAlignmentScore</p>
<div class="comment">
<span class="markdown">The alignment proximity score</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#AlignmentScore"
title="http://research.ibm.com/ontologies/hspo/AlignmentScore">Alignment Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasBehaviour">
<h3>hasBehaviour<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasBehaviour</p>
<div class="comment">
<span class="markdown">A behaviour for a Person. E.g. diet, smoking, exercise, etc.</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Behaviour"
title="http://research.ibm.com/ontologies/hspo/Behaviour">Behaviour</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasConfidenceScore">
<h3>hasConfidenceScore<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasConfidenceScore</p>
<div class="comment">
<span class="markdown">Relates the evidence to a confidence score</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasDisease">
<h3>hasDisease<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasDisease</p>
<div class="comment">
<span class="markdown">The disease associated with a Person</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Disease" title="http://research.ibm.com/ontologies/hspo/Disease">Disease</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasDuration">
<h3>hasDuration<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasDuration</p>
<div class="comment">
<span class="markdown">The duration of an intervention</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Duration"
title="http://research.ibm.com/ontologies/hspo/Duration">Duration</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasEvidence">
<h3>hasEvidence<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasEvidence</p>
<div class="comment">
<span class="markdown">Relates a social problem, disease or intervention to an evidence, including provenance, confidence score and original knowledge</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Behaviour"
title="http://research.ibm.com/ontologies/hspo/Behaviour">Behaviour</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Disease" title="http://research.ibm.com/ontologies/hspo/Disease">Disease</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasEvidenceGraph">
<h3>hasEvidenceGraph<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasEvidenceGraph</p>
<div class="comment">
<span class="markdown">Relates the evidence to its Evidence Graph</span>
</div>
<div class="description">
<dl>
<dt>has super-properties</dt>
<dd>
<a href="http://www.w3.org/ns/prov#wasGeneratedBy"
target="_blank"
title="http://www.w3.org/ns/prov#wasGeneratedBy">was generated by</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has domain</dt>
<dd>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#EvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/EvidenceGraph">Evidence Graph</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasEvidenceSource">
<h3>hasEvidenceSource<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasEvidenceSource</p>
<div class="comment">
<span class="markdown">The source of the evidence</span>
</div>
<div class="description">
<dl>
<dt>has super-properties</dt>
<dd>
<a href="http://www.w3.org/ns/prov#wasDerivedFrom"
target="_blank"
title="http://www.w3.org/ns/prov#wasDerivedFrom">was derived from</a>
<sup class="type-op" title="object property">op</sup>
</dd>
<dt>has domain</dt>
<dd>
<a href="#Evidence"
title="http://research.ibm.com/ontologies/hspo/Evidence">Evidence</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#EvidenceSource"
title="http://research.ibm.com/ontologies/hspo/EvidenceSource">Evidence Source</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasGender">
<h3>hasGender<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasGender</p>
<div class="comment">
<span class="markdown">The gender of a person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasIntervention">
<h3>hasIntervention<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasIntervention</p>
<div class="comment">
<span class="markdown">An intervention for a Person</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionOutcome">
<h3>hasInterventionOutcome<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionOutcome</p>
<div class="comment">
<span class="markdown">Relates an outcome to an intervention</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionOutcomeMetric">
<h3>hasInterventionOutcomeMetric<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeMetric</p>
<div class="comment">
<span class="markdown">The metric to measure an outcome.</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionOutcomeMetric"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeMetric">Intervention Outcome Metric</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionOutcomeResult">
<h3>hasInterventionOutcomeResult<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeResult</p>
<div class="comment">
<span class="markdown">The outcome result scale.</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionOutcomeResult"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeResult">Intervention Outcome Result</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionOutcomeType">
<h3>hasInterventionOutcomeType<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionOutcomeType</p>
<div class="comment">
<span class="markdown">The type of Intervention outcome.</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#InterventionOutcome"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcome">Intervention Outcome</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionOutcomeType"
title="http://research.ibm.com/ontologies/hspo/InterventionOutcomeType">Intervention Outcome Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionProvider">
<h3>hasInterventionProvider<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionProvider</p>
<div class="comment">
<span class="markdown">Intervention provider of an intervention</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionProvider"
title="http://research.ibm.com/ontologies/hspo/InterventionProvider">Intervention Provider</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionStatus">
<h3>hasInterventionStatus<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionStatus</p>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasInterventionType">
<h3>hasInterventionType<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasInterventionType</p>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#InterventionType"
title="http://research.ibm.com/ontologies/hspo/InterventionType">Intervention Type</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasMaritalStatus">
<h3>hasMaritalStatus<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasMaritalStatus</p>
<div class="comment">
<span class="markdown">The marital status of a person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasProbabilityScore">
<h3>hasProbabilityScore<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasProbabilityScore</p>
<div class="comment">
<span class="markdown">The original probability score of the evidence</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#OriginalProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore">Original Probability Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasRaceOrEthnicity">
<h3>hasRaceOrEthnicity<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasRaceOrEthnicity</p>
<div class="comment">
<span class="markdown">The race and/or ethnicity of a person</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasSocialContext">
<h3>hasSocialContext<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasSocialContext</p>
<div class="comment">
<span class="markdown">The social context of a person</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasStageOfLife">
<h3>hasStageOfLife<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasStageOfLife</p>
<div class="comment">
<span class="markdown">The stage of life of a person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="hasTrustScore">
<h3>hasTrustScore<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hasTrustScore</p>
<div class="comment">
<span class="markdown">The datasource trust score</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#ConfidenceScore"
title="http://research.ibm.com/ontologies/hspo/ConfidenceScore">Confidence Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#DatasourceTrustScore"
title="http://research.ibm.com/ontologies/hspo/DatasourceTrustScore">Datasource Trust Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="isPartOfEvidenceGraph">
<h3>isPartOfEvidenceGraph<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/isPartOfEvidenceGraph</p>
<div class="comment">
<span class="markdown">Part of relation used as an evidence to establish Person relation</span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#EvidenceGraph"
title="http://research.ibm.com/ontologies/hspo/EvidenceGraph">Evidence Graph</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Behaviour"
title="http://research.ibm.com/ontologies/hspo/Behaviour">Behaviour</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Disease" title="http://research.ibm.com/ontologies/hspo/Disease">Disease</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Location"
title="http://research.ibm.com/ontologies/hspo/Location">Location</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
<span class="logic">or</span>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
<div class="entity" id="lives">
<h3>lives<sup class="type-op" title="object property">op</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#objectproperties">Object Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives</p>
<div class="comment">
<span class="markdown">The location where the person lives, e.g. address, state, area, country, etc. </span>
</div>
<div class="description">
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="#Location"
title="http://research.ibm.com/ontologies/hspo/Location">Location</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div>
</div><div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="dataproperties">
<h3 id="dataproperties-headline" class="list">Data Properties</h3>
<ul class="hlist">
<li>
<a href="#age_in_years"
title="http://research.ibm.com/ontologies/hspo/age_in_years">Age in years</a>
</li>
<li>
<a href="#alignment_score_value"
title="http://research.ibm.com/ontologies/hspo/alignment_score_value">Alignment score value</a>
</li>
<li>
<a href="#source_ID"
title="http://research.ibm.com/ontologies/hspo/source_ID">Datasource ID</a>
</li>
<li>
<a href="#intervention_code"
title="http://research.ibm.com/ontologies/hspo/intervention_code">Intervention code</a>
</li>
<li>
<a href="#intervention_code_system"
title="http://research.ibm.com/ontologies/hspo/intervention_code_system">Intervention code system</a>
</li>
<li>
<a href="#intervention_name"
title="http://research.ibm.com/ontologies/hspo/intervention_name">Intervention name</a>
</li>
<li>
<a href="#number_in_household"
title="http://research.ibm.com/ontologies/hspo/number_in_household">Number in household</a>
</li>
<li>
<a href="#person_id"
title="http://research.ibm.com/ontologies/hspo/person_id">Person ID</a>
</li>
<li>
<a href="#positivity_indicator"
title="http://research.ibm.com/ontologies/hspo/positivity_indicator">Positivity indicator</a>
</li>
<li>
<a href="#probability_score_metric"
title="http://research.ibm.com/ontologies/hspo/probability_score_metric">Probability score metric</a>
</li>
<li>
<a href="#probability_score_value"
title="http://research.ibm.com/ontologies/hspo/probability_score_value">Probability score value</a>
</li>
<li>
<a href="#trust_score"
title="http://research.ibm.com/ontologies/hspo/trust_score">Trust score</a>
</li>
</ul>
<div class="entity" id="age_in_years">
<h3>Age in years<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/age_in_years</p>
<div class="comment">
<span class="markdown">Current age of a person in years</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Age" title="http://research.ibm.com/ontologies/hspo/Age">Age</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#int"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#int">int</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="alignment_score_value">
<h3>Alignment score value<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/alignment_score_value</p>
<div class="comment">
<span class="markdown">Alignment score between the Evidence and the Person Graphs</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#AlignmentScore"
title="http://research.ibm.com/ontologies/hspo/AlignmentScore">Alignment Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#double"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#double">double</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="source_ID">
<h3>Datasource ID<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/source_ID</p>
<div class="comment">
<span class="markdown">The ID (e.g. URI) of the Evidence Graph source</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#EvidenceSource"
title="http://research.ibm.com/ontologies/hspo/EvidenceSource">Evidence Source</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="intervention_code">
<h3>Intervention code<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/intervention_code</p>
<div class="comment">
<span class="markdown">The code of the intervention</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="intervention_code_system">
<h3>Intervention code system<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/intervention_code_system</p>
<div class="comment">
<span class="markdown">The intervention coding system. E.g. CPT, RxNorm, ICD, etc.</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="intervention_name">
<h3>Intervention name<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/intervention_name</p>
<div class="comment">
<span class="markdown">The name of the intervention, which may include a short textual description </span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Intervention"
title="http://research.ibm.com/ontologies/hspo/Intervention">Intervention</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="number_in_household">
<h3>Number in household<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/number_in_household</p>
<div class="comment">
<span class="markdown">Number in household</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#int"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#int">int</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="person_id">
<h3>Person ID<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/person_id</p>
<div class="comment">
<span class="markdown">The ID of the person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#Person" title="http://research.ibm.com/ontologies/hspo/Person">Person</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="positivity_indicator">
<h3>Positivity indicator<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/positivity_indicator</p>
<div class="comment">
<span class="markdown">Positivity of the social factor.</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#SocialContext"
title="http://research.ibm.com/ontologies/hspo/SocialContext">Social Context</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>{ "contradicting" , "negative" , "neutral" , "positive" }</dd>
</dl>
</div>
</div>
<div class="entity" id="probability_score_metric">
<h3>Probability score metric<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/probability_score_metric</p>
<div class="comment">
<span class="markdown">Probability score metric of the Evidence Graph for a Person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#OriginalProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore">Original Probability Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="probability_score_value">
<h3>Probability score value<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/probability_score_value</p>
<div class="comment">
<span class="markdown">Probability score value of the Evidence Graph for a Person</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#OriginalProbabilityScore"
title="http://research.ibm.com/ontologies/hspo/OriginalProbabilityScore">Original Probability Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#double"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#double">double</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="trust_score">
<h3>Trust score<sup class="type-dp" title="data property">dp</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#dataproperties">Data Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/trust_score</p>
<div class="comment">
<span class="markdown">Datasource Trust Score for the Evidence Graph</span>
</div>
<div class="description">
<p>
<strong>has characteristics:
</strong> functional</p>
<dl>
<dt>has domain</dt>
<dd>
<a href="#DatasourceTrustScore"
title="http://research.ibm.com/ontologies/hspo/DatasourceTrustScore">Datasource Trust Score</a>
<sup class="type-c" title="class">c</sup>
</dd>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#double"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#double">double</a>
</dd>
</dl>
</div>
</div>
</div><div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
id="annotationproperties">
<h3 id="annotationproperties" class="list">Annotation Properties</h3>
<ul class="hlist">
<li>
<a href="#http://purl.org/dc/elements/1.1/abstract" title="http://purl.org/dc/elements/1.1/abstract">
<span>abstract</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2004/02/skos/core#broader" title="http://www.w3.org/2004/02/skos/core#broader">
<span>broader</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2002/07/owl#cardinality" title="http://www.w3.org/2002/07/owl#cardinality">
<span>cardinality</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/created" title="http://purl.org/dc/elements/1.1/created">
<span>created</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/created" title="http://purl.org/dc/terms/created">
<span>created</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/creator" title="http://purl.org/dc/elements/1.1/creator">
<span>creator</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/description" title="http://purl.org/dc/elements/1.1/description">
<span>description</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2000/01/rdf-schema#displayName" title="http://www.w3.org/2000/01/rdf-schema#displayName">
<span>display name</span>
</a>
</li>
<li>
<a href="#http://www.geneontology.org/formats/oboInOwl#hasDbXref"
title="http://www.geneontology.org/formats/oboInOwl#hasDbXref">hasMapping</a>
</li>
<li>
<a href="#icd10Code" title="http://research.ibm.com/ontologies/hspo/icd10Code">
<span>icd10 code</span>
</a>
</li>
<li>
<a href="#icd9Code" title="http://research.ibm.com/ontologies/hspo/icd9Code">
<span>icd9 code</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/modified" title="http://purl.org/dc/elements/1.1/modified">
<span>modified</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/modified" title="http://purl.org/dc/terms/modified">
<span>modified</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/2004/02/skos/core#narrower" title="http://www.w3.org/2004/02/skos/core#narrower">
<span>narrower</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/publisher" title="http://purl.org/dc/elements/1.1/publisher">
<span>publisher</span>
</a>
</li>
<li>
<a href="#http://www.w3.org/1999/02/22-rdf-syntax-ns#resource"
title="http://www.w3.org/1999/02/22-rdf-syntax-ns#resource">
<span>resource</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/source" title="http://purl.org/dc/elements/1.1/source">
<span>source</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/elements/1.1/title" title="http://purl.org/dc/elements/1.1/title">
<span>title</span>
</a>
</li>
<li>
<a href="#http://purl.org/dc/terms/title" title="http://purl.org/dc/terms/title">
<span>title</span>
</a>
</li>
<li>
<a href="#umlsCui" title="http://research.ibm.com/ontologies/hspo/umlsCui">
<span>umls cui</span>
</a>
</li>
</ul>
<div class="entity" id="http://purl.org/dc/elements/1.1/abstract">
<h3>abstract<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/abstract</p>
</div>
<div class="entity" id="http://www.w3.org/2004/02/skos/core#broader">
<h3>broader<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.w3.org/2004/02/skos/core#broader</p>
</div>
<div class="entity" id="http://www.w3.org/2002/07/owl#cardinality">
<h3>cardinality<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.w3.org/2002/07/owl#cardinality</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/created">
<h3>created<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/created</p>
</div>
<div class="entity" id="http://purl.org/dc/terms/created">
<h3>created<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/terms/created</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/creator">
<h3>creator<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/creator</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/description">
<h3>description<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/description</p>
</div>
<div class="entity" id="http://www.w3.org/2000/01/rdf-schema#displayName">
<h3>display name<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.w3.org/2000/01/rdf-schema#displayName</p>
</div>
<div class="entity" id="http://www.geneontology.org/formats/oboInOwl#hasDbXref">
<h3>hasMapping<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.geneontology.org/formats/oboInOwl#hasDbXref</p>
</div>
<div class="entity" id="icd10Code">
<h3>icd10 code<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/icd10Code</p>
<div class="comment">
<span class="markdown">The ICD-10 code</span>
</div>
<div class="description">
<dl>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="icd9Code">
<h3>icd9 code<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/icd9Code</p>
<div class="comment">
<span class="markdown">The ICD-9 code</span>
</div>
<div class="description">
<dl>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/modified">
<h3>modified<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/modified</p>
</div>
<div class="entity" id="http://purl.org/dc/terms/modified">
<h3>modified<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/terms/modified</p>
</div>
<div class="entity" id="http://www.w3.org/2004/02/skos/core#narrower">
<h3>narrower<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.w3.org/2004/02/skos/core#narrower</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/publisher">
<h3>publisher<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/publisher</p>
</div>
<div class="entity" id="http://www.w3.org/1999/02/22-rdf-syntax-ns#resource">
<h3>resource<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://www.w3.org/1999/02/22-rdf-syntax-ns#resource</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/source">
<h3>source<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/source</p>
</div>
<div class="entity" id="http://purl.org/dc/elements/1.1/title">
<h3>title<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/elements/1.1/title</p>
</div>
<div class="entity" id="http://purl.org/dc/terms/title">
<h3>title<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://purl.org/dc/terms/title</p>
</div>
<div class="entity" id="umlsCui">
<h3>umls cui<sup class="type-ap" title="annotation property">ap</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#annotationproperties">Annotation Property ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/umlsCui</p>
<div class="comment">
<span class="markdown">The UMLS entity identifier (CUI)</span>
</div>
<div class="description">
<dl>
<dt>has range</dt>
<dd>
<a href="http://www.w3.org/2001/XMLSchema#string"
target="_blank"
title="http://www.w3.org/2001/XMLSchema#string">string</a>
</dd>
</dl>
</div>
</div>
</div><div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="namedindividuals">
<h3 id="namedindividuals" class="list">Named Individuals</h3>
<ul class="hlist">
<li>
<a href="#ten_to_fourteen"
title="http://research.ibm.com/ontologies/hspo/ten_to_fourteen">10 to 14</a>
</li>
<li>
<a href="#fifteen_to_nineteen"
title="http://research.ibm.com/ontologies/hspo/fifteen_to_nineteen">15 to 19</a>
</li>
<li>
<a href="#twenty_to_twentyfour"
title="http://research.ibm.com/ontologies/hspo/twenty_to_twentyfour">20 to 24</a>
</li>
<li>
<a href="#twentyfive_to_twentynine"
title="http://research.ibm.com/ontologies/hspo/twentyfive_to_twentynine">25 to 29</a>
</li>
<li>
<a href="#thirty_to_thirtyfour"
title="http://research.ibm.com/ontologies/hspo/thirty_to_thirtyfour">30 to 34</a>
</li>
<li>
<a href="#thirtyfive_to_thirtynine"
title="http://research.ibm.com/ontologies/hspo/thirtyfive_to_thirtynine">35 to 39</a>
</li>
<li>
<a href="#forty_to_fortyfour"
title="http://research.ibm.com/ontologies/hspo/forty_to_fortyfour">40 to 44</a>
</li>
<li>
<a href="#fortyfive_to_fortynine"
title="http://research.ibm.com/ontologies/hspo/fortyfive_to_fortynine">45 to 49</a>
</li>
<li>
<a href="#five_to_nine"
title="http://research.ibm.com/ontologies/hspo/five_to_nine">5 to 9</a>
</li>
<li>
<a href="#fifty_to_fiftyfour"
title="http://research.ibm.com/ontologies/hspo/fifty_to_fiftyfour">50 to 54</a>
</li>
<li>
<a href="#fiftyfive_to_fiftynine"
title="http://research.ibm.com/ontologies/hspo/fiftyfive_to_fiftynine">55 to 59</a>
</li>
<li>
<a href="#sixty_to_sixtyfour"
title="http://research.ibm.com/ontologies/hspo/sixty_to_sixtyfour">60 to 64</a>
</li>
<li>
<a href="#sixtyfive_to_sixtynine"
title="http://research.ibm.com/ontologies/hspo/sixtyfive_to_sixtynine">65 to 69</a>
</li>
<li>
<a href="#seventy_to_seventyfour"
title="http://research.ibm.com/ontologies/hspo/seventy_to_seventyfour">70 to 74</a>
</li>
<li>
<a href="#seventyfive_to_seventynine"
title="http://research.ibm.com/ontologies/hspo/seventyfive_to_seventynine">75 to 79</a>
</li>
<li>
<a href="#eighty_to_eightyfour"
title="http://research.ibm.com/ontologies/hspo/eighty_to_eightyfour">80 to 84</a>
</li>
<li>
<a href="#eightyfive_and_over"
title="http://research.ibm.com/ontologies/hspo/eightyfive_and_over">85 and over</a>
</li>
<li>
<a href="#adult" title="http://research.ibm.com/ontologies/hspo/adult">Adult</a>
</li>
<li>
<a href="#african_race"
title="http://research.ibm.com/ontologies/hspo/african_race">African race</a>
</li>
<li>
<a href="#agnosticism"
title="http://research.ibm.com/ontologies/hspo/agnosticism">Agnosticism</a>
</li>
<li>
<a href="#american_indian_or_alaska_native"
title="http://research.ibm.com/ontologies/hspo/american_indian_or_alaska_native">American Indian or Alaska native</a>
</li>
<li>
<a href="#applied_intervention"
title="http://research.ibm.com/ontologies/hspo/applied_intervention">Applied intervention</a>
</li>
<li>
<a href="#asian_or_pacific_islander"
title="http://research.ibm.com/ontologies/hspo/asian_or_pacific_islander">Asian or Pacific islander</a>
</li>
<li>
<a href="#atheism" title="http://research.ibm.com/ontologies/hspo/atheism">Atheism</a>
</li>
<li>
<a href="#australian_aborigine"
title="http://research.ibm.com/ontologies/hspo/australian_aborigine">Australian aborigine</a>
</li>
<li>
<a href="#available_intervention"
title="http://research.ibm.com/ontologies/hspo/available_intervention">Available intervention</a>
</li>
<li>
<a href="#bachelor"
title="http://research.ibm.com/ontologies/hspo/bachelor">Bachelor</a>
</li>
<li>
<a href="#bahai" title="http://research.ibm.com/ontologies/hspo/bahai">Baha'i Faith</a>
</li>
<li>
<a href="#broken_engagement"
title="http://research.ibm.com/ontologies/hspo/broken_engagement">Broken engagement</a>
</li>
<li>
<a href="#broken_with_partner"
title="http://research.ibm.com/ontologies/hspo/broken_with_partner">Broken with partner</a>
</li>
<li>
<a href="#buddhism"
title="http://research.ibm.com/ontologies/hspo/buddhism">Buddhism</a>
</li>
<li>
<a href="#mahayana"
title="http://research.ibm.com/ontologies/hspo/mahayana">Buddhism: Mahayana</a>
</li>
<li>
<a href="#buddhism_other"
title="http://research.ibm.com/ontologies/hspo/buddhism_other">Buddhism: Other</a>
</li>
<li>
<a href="#tantrayana"
title="http://research.ibm.com/ontologies/hspo/tantrayana">Buddhism: Tantrayana</a>
</li>
<li>
<a href="#theravada"
title="http://research.ibm.com/ontologies/hspo/theravada">Buddhism: Theravada</a>
</li>
<li>
<a href="#caucasian"
title="http://research.ibm.com/ontologies/hspo/caucasian">Caucasian</a>
</li>
<li>
<a href="#child" title="http://research.ibm.com/ontologies/hspo/child">Child</a>
</li>
<li>
<a href="#child_lives_with_unrelated_adult"
title="http://research.ibm.com/ontologies/hspo/child_lives_with_unrelated_adult">Child lives with unrelated adult</a>
</li>
<li>
<a href="#chinese_folk_religion"
title="http://research.ibm.com/ontologies/hspo/chinese_folk_religion">Chinese Folk Religion</a>
</li>
<li>
<a href="#christian"
title="http://research.ibm.com/ontologies/hspo/christian">Christian</a>
</li>
<li>
<a href="#african_methodist_episcopal"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal">Christian: African Methodist Episcopal</a>
</li>
<li>
<a href="#african_methodist_episcopal_zion"
title="http://research.ibm.com/ontologies/hspo/african_methodist_episcopal_zion">Christian: African Methodist Episcopal Zion</a>
</li>
<li>
<a href="#american_baptist_church"
title="http://research.ibm.com/ontologies/hspo/american_baptist_church">Christian: American Baptist Church</a>
</li>
<li>
<a href="#anglican"
title="http://research.ibm.com/ontologies/hspo/anglican">Christian: Anglican</a>
</li>
<li>
<a href="#assembly_of_god"
title="http://research.ibm.com/ontologies/hspo/assembly_of_god">Christian: Assembly of God</a>
</li>
<li>
<a href="#aptist_church"
title="http://research.ibm.com/ontologies/hspo/aptist_church">Christian: Baptist Church</a>
</li>
<li>
<a href="#christian_missionary_alliance"
title="http://research.ibm.com/ontologies/hspo/christian_missionary_alliance">Christian: Christian Missionary Alliance</a>
</li>
<li>
<a href="#christian_reformed"
title="http://research.ibm.com/ontologies/hspo/christian_reformed">Christian: Christian Reformed</a>
</li>
<li>
<a href="#christian_science"
title="http://research.ibm.com/ontologies/hspo/christian_science">Christian: Christian Science Church</a>
</li>
<li>
<a href="#church_of_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_christ">Christian: Church of Christ</a>
</li>
<li>
<a href="#church_of_god"
title="http://research.ibm.com/ontologies/hspo/church_of_god">Christian: Church of God</a>
</li>
<li>
<a href="#church_of_god_in_christ"
title="http://research.ibm.com/ontologies/hspo/church_of_god_in_christ">Christian: Church of God in Christ</a>
</li>
<li>
<a href="#church_of_the_nazarene"
title="http://research.ibm.com/ontologies/hspo/church_of_the_nazarene">Christian: Church of the Nazarene</a>
</li>
<li>
<a href="#community_church"
title="http://research.ibm.com/ontologies/hspo/community_church">Christian: Community Church</a>
</li>
<li>
<a href="#congregational_church"
title="http://research.ibm.com/ontologies/hspo/congregational_church">Christian: Congregational</a>
</li>
<li>
<a href="#eastern_orthodox"
title="http://research.ibm.com/ontologies/hspo/eastern_orthodox">Christian: Eastern Orthodox</a>
</li>
<li>
<a href="#episcopalian"
title="http://research.ibm.com/ontologies/hspo/episcopalian">Christian: Episcopalian</a>
</li>
<li>
<a href="#evangelical_church"
title="http://research.ibm.com/ontologies/hspo/evangelical_church">Christian: Evangelical Church</a>
</li>
<li>
<a href="#free_will_baptist"
title="http://research.ibm.com/ontologies/hspo/free_will_baptist">Christian: Free Will Baptist</a>
</li>
<li>
<a href="#friends_church"
title="http://research.ibm.com/ontologies/hspo/friends_church">Christian: Friends Church or Quakers</a>
</li>
<li>
<a href="#greek_orthodox"
title="http://research.ibm.com/ontologies/hspo/greek_orthodox">Christian: Greek Orthodox</a>
</li>
<li>
<a href="#jehovahs_witness"
title="http://research.ibm.com/ontologies/hspo/jehovahs_witness">Christian: Jehovahs Witness</a>
</li>
<li>
<a href="#latter_day_saints_church"
title="http://research.ibm.com/ontologies/hspo/latter_day_saints_church">Christian: Latter-day Saints</a>
</li>
<li>
<a href="#lutheran"
title="http://research.ibm.com/ontologies/hspo/lutheran">Christian: Lutheran</a>
</li>
<li>
<a href="#lutheran_missouri_synod"
title="http://research.ibm.com/ontologies/hspo/lutheran_missouri_synod">Christian: Lutheran Missouri Synod</a>
</li>
<li>
<a href="#mennonite"
title="http://research.ibm.com/ontologies/hspo/mennonite">Christian: Mennonite</a>
</li>
<li>
<a href="#methodist"
title="http://research.ibm.com/ontologies/hspo/methodist">Christian: Methodist</a>
</li>
<li>
<a href="#orthodox"
title="http://research.ibm.com/ontologies/hspo/orthodox">Christian: Orthodox</a>
</li>
<li>
<a href="#christian_other"
title="http://research.ibm.com/ontologies/hspo/christian_other">Christian: Other</a>
</li>
<li>
<a href="#other_pentecostal"
title="http://research.ibm.com/ontologies/hspo/other_pentecostal">Christian: Other Pentecostal</a>
</li>
<li>
<a href="#other_protestant"
title="http://research.ibm.com/ontologies/hspo/other_protestant">Christian: Other Protestant</a>
</li>
<li>
<a href="#pentecostal"
title="http://research.ibm.com/ontologies/hspo/pentecostal">Christian: Pentecostal</a>
</li>
<li>
<a href="#presbyterian"
title="http://research.ibm.com/ontologies/hspo/presbyterian">Christian: Presbyterian</a>
</li>
<li>
<a href="#protestant"
title="http://research.ibm.com/ontologies/hspo/protestant">Christian: Protestant</a>
</li>
<li>
<a href="#reformed_church"
title="http://research.ibm.com/ontologies/hspo/reformed_church">Christian: Reformed Church</a>
</li>
<li>
<a href="#rlds" title="http://research.ibm.com/ontologies/hspo/rlds">Christian: Reorganized Church of Jesus Christ of LDS</a>
</li>
<li>
<a href="#roman_catholic"
title="http://research.ibm.com/ontologies/hspo/roman_catholic">Christian: Roman Catholic</a>
</li>
<li>
<a href="#salvation_army"
title="http://research.ibm.com/ontologies/hspo/salvation_army">Christian: Salvation Army</a>
</li>
<li>
<a href="#seventh_day_adventist"
title="http://research.ibm.com/ontologies/hspo/seventh_day_adventist">Christian: Seventh Day Adventist</a>
</li>
<li>
<a href="#southern_baptist"
title="http://research.ibm.com/ontologies/hspo/southern_baptist">Christian: Southern Baptist Convention</a>
</li>
<li>
<a href="#unitarian"
title="http://research.ibm.com/ontologies/hspo/unitarian">Christian: Unitarian</a>
</li>
<li>
<a href="#unitarian_universalism"
title="http://research.ibm.com/ontologies/hspo/unitarian_universalism">Christian: Unitarian Universalism</a>
</li>
<li>
<a href="#united_church_of_christ"
title="http://research.ibm.com/ontologies/hspo/united_church_of_christ">Christian: United Church of Christ</a>
</li>
<li>
<a href="#united_methodist"
title="http://research.ibm.com/ontologies/hspo/united_methodist">Christian: United Methodist</a>
</li>
<li>
<a href="#wesleyan"
title="http://research.ibm.com/ontologies/hspo/wesleyan">Christian: Wesleyan</a>
</li>
<li>
<a href="#cohabitee_left_home"
title="http://research.ibm.com/ontologies/hspo/cohabitee_left_home">Cohabitee left home</a>
</li>
<li>
<a href="#cohabiting"
title="http://research.ibm.com/ontologies/hspo/cohabiting">Cohabiting</a>
</li>
<li>
<a href="#common_law_partnership"
title="http://research.ibm.com/ontologies/hspo/common_law_partnership">Common law partnership</a>
</li>
<li>
<a href="#confucianism"
title="http://research.ibm.com/ontologies/hspo/confucianism">Confucianism</a>
</li>
<li>
<a href="#divorced"
title="http://research.ibm.com/ontologies/hspo/divorced">Divorced</a>
</li>
<li>
<a href="#divorced_couple_sharing_house"
title="http://research.ibm.com/ontologies/hspo/divorced_couple_sharing_house">Divorced couple sharing house</a>
</li>
<li>
<a href="#domestic_partnership"
title="http://research.ibm.com/ontologies/hspo/domestic_partnership">Domestic partnership</a>
</li>
<li>
<a href="#elderly_relative_lives_with_family"
title="http://research.ibm.com/ontologies/hspo/elderly_relative_lives_with_family">Elderly relative lives with family</a>
</li>
<li>
<a href="#eloped" title="http://research.ibm.com/ontologies/hspo/eloped">Eloped</a>
</li>
<li>
<a href="#engaged_to_be_married"
title="http://research.ibm.com/ontologies/hspo/engaged_to_be_married">Engaged to be married</a>
</li>
<li>
<a href="#ethnic_religion"
title="http://research.ibm.com/ontologies/hspo/ethnic_religion">Ethnic Religion</a>
</li>
<li>
<a href="#feminine_gender"
title="http://research.ibm.com/ontologies/hspo/feminine_gender">Feminine gender</a>
</li>
<li>
<a href="#gender_unknown"
title="http://research.ibm.com/ontologies/hspo/gender_unknown">Gender unknown</a>
</li>
<li>
<a href="#gender_unspecified"
title="http://research.ibm.com/ontologies/hspo/gender_unspecified">Gender unspecified</a>
</li>
<li>
<a href="#hinduism"
title="http://research.ibm.com/ontologies/hspo/hinduism">Hinduism</a>
</li>
<li>
<a href="#hinduism_other"
title="http://research.ibm.com/ontologies/hspo/hinduism_other">Hinduism: Other</a>
</li>
<li>
<a href="#shaivism"
title="http://research.ibm.com/ontologies/hspo/shaivism">Hinduism: Shaivism</a>
</li>
<li>
<a href="#vaishnavism"
title="http://research.ibm.com/ontologies/hspo/vaishnavism">Hinduism: Vaishnavism</a>
</li>
<li>
<a href="#hispanic"
title="http://research.ibm.com/ontologies/hspo/hispanic">Hispanic</a>
</li>
<li>
<a href="#homosexual_marriage"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage">Homosexual marriage</a>
</li>
<li>
<a href="#homosexual_marriage_female"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_female">Homosexual marriage, female</a>
</li>
<li>
<a href="#homosexual_marriage_male"
title="http://research.ibm.com/ontologies/hspo/homosexual_marriage_male">Homosexual marriage, male</a>
</li>
<li>
<a href="#husband_left_home"
title="http://research.ibm.com/ontologies/hspo/husband_left_home">Husband left home</a>
</li>
<li>
<a href="#indian" title="http://research.ibm.com/ontologies/hspo/indian">Indian</a>
</li>
<li>
<a href="#infant" title="http://research.ibm.com/ontologies/hspo/infant">Infant</a>
</li>
<li>
<a href="#medication_provisioning"
title="http://research.ibm.com/ontologies/hspo/medication_provisioning">Intervention by provisioning a medication</a>
</li>
<li>
<a href="#procedure_provisioning"
title="http://research.ibm.com/ontologies/hspo/procedure_provisioning">Intervention by provisioning a procedure</a>
</li>
<li>
<a href="#social_action_provisioning"
title="http://research.ibm.com/ontologies/hspo/social_action_provisioning">Intervention by provisioning a social action</a>
</li>
<li>
<a href="#jainism" title="http://research.ibm.com/ontologies/hspo/jainism">Jainism</a>
</li>
<li>
<a href="#judaism" title="http://research.ibm.com/ontologies/hspo/judaism">Judaism</a>
</li>
<li>
<a href="#conservative_judaism"
title="http://research.ibm.com/ontologies/hspo/conservative_judaism">Judaism: Conservative Judaism</a>
</li>
<li>
<a href="#jewish_renewal"
title="http://research.ibm.com/ontologies/hspo/jewish_renewal">Judaism: Jewish Renewal</a>
</li>
<li>
<a href="#orthodox_judaism"
title="http://research.ibm.com/ontologies/hspo/orthodox_judaism">Judaism: Orthodox Judaism</a>
</li>
<li>
<a href="#judaism_other"
title="http://research.ibm.com/ontologies/hspo/judaism_other">Judaism: Other</a>
</li>
<li>
<a href="#reconstructionist_judaism"
title="http://research.ibm.com/ontologies/hspo/reconstructionist_judaism">Judaism: Reconstructionist Judaism</a>
</li>
<li>
<a href="#reform_judaism"
title="http://research.ibm.com/ontologies/hspo/reform_judaism">Judaism: Reform Judaism</a>
</li>
<li>
<a href="#legally_separated_with_interlocutory_decree"
title="http://research.ibm.com/ontologies/hspo/legally_separated_with_interlocutory_decree">Legally separated with interlocutory decree</a>
</li>
<li>
<a href="#lives_alone"
title="http://research.ibm.com/ontologies/hspo/lives_alone">Lives alone</a>
</li>
<li>
<a href="#lives_alone_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_help_available">Lives alone, help available</a>
</li>
<li>
<a href="#lives_alone_needs_housekeeper"
title="http://research.ibm.com/ontologies/hspo/lives_alone_needs_housekeeper">Lives alone, needs housekeeper</a>
</li>
<li>
<a href="#lives_alone_no_help_available"
title="http://research.ibm.com/ontologies/hspo/lives_alone_no_help_available">Lives alone, no help available</a>
</li>
<li>
<a href="#lives_as_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_companion">Lives as companion</a>
</li>
<li>
<a href="#lives_as_paid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_paid_companion">Lives as paid companion</a>
</li>
<li>
<a href="#lives_as_unpaid_companion"
title="http://research.ibm.com/ontologies/hspo/lives_as_unpaid_companion">Lives as unpaid companion</a>
</li>
<li>
<a href="#lives_in_a_commune"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_commune">Lives in a commune</a>
</li>
<li>
<a href="#lives_in_a_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_community">Lives in a community</a>
</li>
<li>
<a href="#lives_in_a_school_community"
title="http://research.ibm.com/ontologies/hspo/lives_in_a_school_community">Lives in a school community</a>
</li>
<li>
<a href="#lives_in_boarding_school"
title="http://research.ibm.com/ontologies/hspo/lives_in_boarding_school">Lives in boarding school</a>
</li>
<li>
<a href="#lives_with_children"
title="http://research.ibm.com/ontologies/hspo/lives_with_children">Lives with children</a>
</li>
<li>
<a href="#lives_with_companion"
title="http://research.ibm.com/ontologies/hspo/lives_with_companion">Lives with companion</a>
</li>
<li>
<a href="#lives_with_daughter"
title="http://research.ibm.com/ontologies/hspo/lives_with_daughter">Lives with daughter</a>
</li>
<li>
<a href="#lives_with_family"
title="http://research.ibm.com/ontologies/hspo/lives_with_family">Lives with family</a>
</li>
<li>
<a href="#lives_with_father"
title="http://research.ibm.com/ontologies/hspo/lives_with_father">Lives with father</a>
</li>
<li>
<a href="#lives_with_friends"
title="http://research.ibm.com/ontologies/hspo/lives_with_friends">Lives with friends</a>
</li>
<li>
<a href="#lives_with_grandfather"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandfather">Lives with grandfather</a>
</li>
<li>
<a href="#lives_with_grandmother"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandmother">Lives with grandmother</a>
</li>
<li>
<a href="#lives_with_grandparents"
title="http://research.ibm.com/ontologies/hspo/lives_with_grandparents">Lives with grandparents</a>
</li>
<li>
<a href="#lives_with_husband"
title="http://research.ibm.com/ontologies/hspo/lives_with_husband">Lives with husband</a>
</li>
<li>
<a href="#lives_with_lodger"
title="http://research.ibm.com/ontologies/hspo/lives_with_lodger">Lives with lodger</a>
</li>
<li>
<a href="#lives_with_mother"
title="http://research.ibm.com/ontologies/hspo/lives_with_mother">Lives with mother</a>
</li>
<li>
<a href="#lives_with_parents"
title="http://research.ibm.com/ontologies/hspo/lives_with_parents">Lives with parents</a>
</li>
<li>
<a href="#lives_with_partner"
title="http://research.ibm.com/ontologies/hspo/lives_with_partner">Lives with partner</a>
</li>
<li>
<a href="#lives_with_roommate"
title="http://research.ibm.com/ontologies/hspo/lives_with_roommate">Lives with roommate</a>
</li>
<li>
<a href="#lives_with_son"
title="http://research.ibm.com/ontologies/hspo/lives_with_son">Lives with son</a>
</li>
<li>
<a href="#lives_with_spouse"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse">Lives with spouse</a>
</li>
<li>
<a href="#lives_with_spouse_only"
title="http://research.ibm.com/ontologies/hspo/lives_with_spouse_only">Lives with spouse only</a>
</li>
<li>
<a href="#lives_with_wife"
title="http://research.ibm.com/ontologies/hspo/lives_with_wife">Lives with wife</a>
</li>
<li>
<a href="#living_temporarily_with_relatives"
title="http://research.ibm.com/ontologies/hspo/living_temporarily_with_relatives">Living temporarily with relatives</a>
</li>
<li>
<a href="#marital_state_unknown"
title="http://research.ibm.com/ontologies/hspo/marital_state_unknown">Marital state unknown</a>
</li>
<li>
<a href="#marriage_annulment"
title="http://research.ibm.com/ontologies/hspo/marriage_annulment">Marriage annulment</a>
</li>
<li>
<a href="#married" title="http://research.ibm.com/ontologies/hspo/married">Married</a>
</li>
<li>
<a href="#masculine_gender"
title="http://research.ibm.com/ontologies/hspo/masculine_gender">Masculine gender</a>
</li>
<li>
<a href="#middle_age_adult"
title="http://research.ibm.com/ontologies/hspo/middle_age_adult">Middle age adult</a>
</li>
<li>
<a href="#monogamous"
title="http://research.ibm.com/ontologies/hspo/monogamous">Monogamous</a>
</li>
<li>
<a href="#muslim" title="http://research.ibm.com/ontologies/hspo/muslim">Muslim</a>
</li>
<li>
<a href="#muslim_other"
title="http://research.ibm.com/ontologies/hspo/muslim_other">Muslim: Other</a>
</li>
<li>
<a href="#shia_islam"
title="http://research.ibm.com/ontologies/hspo/shia_islam">Muslim: Shia Islam</a>
</li>
<li>
<a href="#sunni_islam"
title="http://research.ibm.com/ontologies/hspo/sunni_islam">Muslim: Sunni Islam</a>
</li>
<li>
<a href="#native_american"
title="http://research.ibm.com/ontologies/hspo/native_american">Native American</a>
</li>
<li>
<a href="#new_religion"
title="http://research.ibm.com/ontologies/hspo/new_religion">New Religion Movement</a>
</li>
<li>
<a href="#newly_wed"
title="http://research.ibm.com/ontologies/hspo/newly_wed">Newly wed</a>
</li>
<li>
<a href="#nonreligious"
title="http://research.ibm.com/ontologies/hspo/nonreligious">Non religious</a>
</li>
<li>
<a href="#non_binary_gender"
title="http://research.ibm.com/ontologies/hspo/non_binary_gender">Non-binary gender</a>
</li>
<li>
<a href="#ongoing_intervention"
title="http://research.ibm.com/ontologies/hspo/ongoing_intervention">Ongoing intervention</a>
</li>
<li>
<a href="#other_religion"
title="http://research.ibm.com/ontologies/hspo/other_religion">Other religion</a>
</li>
<li>
<a href="#planned_intervention"
title="http://research.ibm.com/ontologies/hspo/planned_intervention">Planned intervention</a>
</li>
<li>
<a href="#polygamous"
title="http://research.ibm.com/ontologies/hspo/polygamous">Polygamous</a>
</li>
<li>
<a href="#purposely_unmarried_and_sexually_abstinent"
title="http://research.ibm.com/ontologies/hspo/purposely_unmarried_and_sexually_abstinent">Purposely unmarried and sexually abstinent</a>
</li>
<li>
<a href="#race_not_stated"
title="http://research.ibm.com/ontologies/hspo/race_not_stated">Race not stated</a>
</li>
<li>
<a href="#recommended_intervention"
title="http://research.ibm.com/ontologies/hspo/recommended_intervention">Recommended intervention</a>
</li>
<li>
<a href="#rejected_intervention"
title="http://research.ibm.com/ontologies/hspo/rejected_intervention">Rejected intervention</a>
</li>
<li>
<a href="#religion_unknown"
title="http://research.ibm.com/ontologies/hspo/religion_unknown">Religion is unknown</a>
</li>
<li>
<a href="#remarried"
title="http://research.ibm.com/ontologies/hspo/remarried">Remarried</a>
</li>
<li>
<a href="#senior_adult"
title="http://research.ibm.com/ontologies/hspo/senior_adult">Senior Adult</a>
</li>
<li>
<a href="#separated"
title="http://research.ibm.com/ontologies/hspo/separated">Separated</a>
</li>
<li>
<a href="#separated_from_cohabitee"
title="http://research.ibm.com/ontologies/hspo/separated_from_cohabitee">Separated from cohabitee</a>
</li>
<li>
<a href="#shinto" title="http://research.ibm.com/ontologies/hspo/shinto">Shinto or Shintoism</a>
</li>
<li>
<a href="#sikhism" title="http://research.ibm.com/ontologies/hspo/sikhism">Sikhism</a>
</li>
<li>
<a href="#single_person"
title="http://research.ibm.com/ontologies/hspo/single_person">Single person</a>
</li>
<li>
<a href="#single_never_married"
title="http://research.ibm.com/ontologies/hspo/single_never_married">Single, never married</a>
</li>
<li>
<a href="#spinster"
title="http://research.ibm.com/ontologies/hspo/spinster">Spinster</a>
</li>
<li>
<a href="#spiritualism"
title="http://research.ibm.com/ontologies/hspo/spiritualism">Spiritualism</a>
</li>
<li>
<a href="#spouse_left_home"
title="http://research.ibm.com/ontologies/hspo/spouse_left_home">Spouse left home</a>
</li>
<li>
<a href="#transgender_female_to_male"
title="http://research.ibm.com/ontologies/hspo/transgender_female_to_male">Surgically transgendered transsexual, female-to-male</a>
</li>
<li>
<a href="#transgender_male_to_female"
title="http://research.ibm.com/ontologies/hspo/transgender_male_to_female">Surgically transgendered transsexual, male-to-female</a>
</li>
<li>
<a href="#teen" title="http://research.ibm.com/ontologies/hspo/teen">Teenager</a>
</li>
<li>
<a href="#toddler" title="http://research.ibm.com/ontologies/hspo/toddler">Toddler</a>
</li>
<li>
<a href="#transgender"
title="http://research.ibm.com/ontologies/hspo/transgender">Transgender</a>
</li>
<li>
<a href="#trial_separation"
title="http://research.ibm.com/ontologies/hspo/trial_separation">Trial separation</a>
</li>
<li>
<a href="#under_five"
title="http://research.ibm.com/ontologies/hspo/under_five">Under 5</a>
</li>
<li>
<a href="#race_unknown"
title="http://research.ibm.com/ontologies/hspo/race_unknown">Unknown racial group</a>
</li>
<li>
<a href="#widow" title="http://research.ibm.com/ontologies/hspo/widow">Widow</a>
</li>
<li>
<a href="#widowed" title="http://research.ibm.com/ontologies/hspo/widowed">Widowed</a>
</li>
<li>
<a href="#widower" title="http://research.ibm.com/ontologies/hspo/widower">Widower</a>
</li>
<li>
<a href="#wife_left_home"
title="http://research.ibm.com/ontologies/hspo/wife_left_home">Wife left home</a>
</li>
</ul>
<div class="entity" id="ten_to_fourteen">
<h3>10 to 14<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/ten_to_fourteen</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="fifteen_to_nineteen">
<h3>15 to 19<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/fifteen_to_nineteen</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="twenty_to_twentyfour">
<h3>20 to 24<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/twenty_to_twentyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="twentyfive_to_twentynine">
<h3>25 to 29<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/twentyfive_to_twentynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="thirty_to_thirtyfour">
<h3>30 to 34<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/thirty_to_thirtyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="thirtyfive_to_thirtynine">
<h3>35 to 39<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/thirtyfive_to_thirtynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="forty_to_fortyfour">
<h3>40 to 44<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/forty_to_fortyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="fortyfive_to_fortynine">
<h3>45 to 49<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/fortyfive_to_fortynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="five_to_nine">
<h3>5 to 9<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/five_to_nine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="fifty_to_fiftyfour">
<h3>50 to 54<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/fifty_to_fiftyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="fiftyfive_to_fiftynine">
<h3>55 to 59<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/fiftyfive_to_fiftynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="sixty_to_sixtyfour">
<h3>60 to 64<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/sixty_to_sixtyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="sixtyfive_to_sixtynine">
<h3>65 to 69<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/sixtyfive_to_sixtynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="seventy_to_seventyfour">
<h3>70 to 74<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/seventy_to_seventyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="seventyfive_to_seventynine">
<h3>75 to 79<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/seventyfive_to_seventynine</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="eighty_to_eightyfour">
<h3>80 to 84<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/eighty_to_eightyfour</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="eightyfive_and_over">
<h3>85 and over<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/eightyfive_and_over</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="adult">
<h3>Adult<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/adult</p>
<div class="comment">
<span class="markdown">20-39 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="african_race">
<h3>African race<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/african_race</p>
<div class="comment">
<span class="markdown">African race (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="agnosticism">
<h3>Agnosticism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/agnosticism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="american_indian_or_alaska_native">
<h3>American Indian or Alaska native<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/american_indian_or_alaska_native</p>
<div class="comment">
<span class="markdown">American Indian or Alaska native (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="applied_intervention">
<h3>Applied intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/applied_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="asian_or_pacific_islander">
<h3>Asian or Pacific islander<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/asian_or_pacific_islander</p>
<div class="comment">
<span class="markdown">Asian or Pacific islander (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="atheism">
<h3>Atheism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/atheism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="australian_aborigine">
<h3>Australian aborigine<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/australian_aborigine</p>
<div class="comment">
<span class="markdown">Australian aborigine (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="available_intervention">
<h3>Available intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/available_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="bachelor">
<h3>Bachelor<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/bachelor</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="bahai">
<h3>Baha'i Faith<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/bahai</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="broken_engagement">
<h3>Broken engagement<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/broken_engagement</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="broken_with_partner">
<h3>Broken with partner<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/broken_with_partner</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="buddhism">
<h3>Buddhism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/buddhism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="mahayana">
<h3>Buddhism: Mahayana<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/mahayana</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="buddhism_other">
<h3>Buddhism: Other<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/buddhism_other</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="tantrayana">
<h3>Buddhism: Tantrayana<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/tantrayana</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="theravada">
<h3>Buddhism: Theravada<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/theravada</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="caucasian">
<h3>Caucasian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/caucasian</p>
<div class="comment">
<span class="markdown">Caucasian (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="child">
<h3>Child<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/child</p>
<div class="comment">
<span class="markdown">5-12 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="child_lives_with_unrelated_adult">
<h3>Child lives with unrelated adult<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/child_lives_with_unrelated_adult</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="chinese_folk_religion">
<h3>Chinese Folk Religion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/chinese_folk_religion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="christian">
<h3>Christian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/christian</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="african_methodist_episcopal">
<h3>Christian: African Methodist Episcopal<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/african_methodist_episcopal</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="african_methodist_episcopal_zion">
<h3>Christian: African Methodist Episcopal Zion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/african_methodist_episcopal_zion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="american_baptist_church">
<h3>Christian: American Baptist Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/american_baptist_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="anglican">
<h3>Christian: Anglican<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/anglican</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="assembly_of_god">
<h3>Christian: Assembly of God<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/assembly_of_god</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="aptist_church">
<h3>Christian: Baptist Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/aptist_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="christian_missionary_alliance">
<h3>Christian: Christian Missionary Alliance<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/christian_missionary_alliance</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="christian_reformed">
<h3>Christian: Christian Reformed<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/christian_reformed</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="christian_science">
<h3>Christian: Christian Science Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/christian_science</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="church_of_christ">
<h3>Christian: Church of Christ<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/church_of_christ</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="church_of_god">
<h3>Christian: Church of God<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/church_of_god</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="church_of_god_in_christ">
<h3>Christian: Church of God in Christ<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/church_of_god_in_christ</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="church_of_the_nazarene">
<h3>Christian: Church of the Nazarene<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/church_of_the_nazarene</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="community_church">
<h3>Christian: Community Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/community_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="congregational_church">
<h3>Christian: Congregational<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/congregational_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="eastern_orthodox">
<h3>Christian: Eastern Orthodox<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/eastern_orthodox</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="episcopalian">
<h3>Christian: Episcopalian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/episcopalian</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="evangelical_church">
<h3>Christian: Evangelical Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/evangelical_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="free_will_baptist">
<h3>Christian: Free Will Baptist<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/free_will_baptist</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="friends_church">
<h3>Christian: Friends Church or Quakers<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/friends_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="greek_orthodox">
<h3>Christian: Greek Orthodox<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/greek_orthodox</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="jehovahs_witness">
<h3>Christian: Jehovahs Witness<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/jehovahs_witness</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="latter_day_saints_church">
<h3>Christian: Latter-day Saints<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/latter_day_saints_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lutheran">
<h3>Christian: Lutheran<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lutheran</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lutheran_missouri_synod">
<h3>Christian: Lutheran Missouri Synod<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lutheran_missouri_synod</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="mennonite">
<h3>Christian: Mennonite<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/mennonite</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="methodist">
<h3>Christian: Methodist<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/methodist</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="orthodox">
<h3>Christian: Orthodox<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/orthodox</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="christian_other">
<h3>Christian: Other<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/christian_other</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="other_pentecostal">
<h3>Christian: Other Pentecostal<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/other_pentecostal</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="other_protestant">
<h3>Christian: Other Protestant<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/other_protestant</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="pentecostal">
<h3>Christian: Pentecostal<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/pentecostal</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="presbyterian">
<h3>Christian: Presbyterian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/presbyterian</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="protestant">
<h3>Christian: Protestant<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/protestant</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="reformed_church">
<h3>Christian: Reformed Church<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/reformed_church</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="rlds">
<h3>Christian: Reorganized Church of Jesus Christ of LDS<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/rlds</p>
<div class="comment">
<span class="markdown">Christian: Reorganized Church of Jesus Christ of Latter Day Saints (RLDS)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="roman_catholic">
<h3>Christian: Roman Catholic<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/roman_catholic</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="salvation_army">
<h3>Christian: Salvation Army<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/salvation_army</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="seventh_day_adventist">
<h3>Christian: Seventh Day Adventist<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/seventh_day_adventist</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="southern_baptist">
<h3>Christian: Southern Baptist Convention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/southern_baptist</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="unitarian">
<h3>Christian: Unitarian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/unitarian</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="unitarian_universalism">
<h3>Christian: Unitarian Universalism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/unitarian_universalism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="united_church_of_christ">
<h3>Christian: United Church of Christ<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/united_church_of_christ</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="united_methodist">
<h3>Christian: United Methodist<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/united_methodist</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="wesleyan">
<h3>Christian: Wesleyan<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/wesleyan</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="cohabitee_left_home">
<h3>Cohabitee left home<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/cohabitee_left_home</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="cohabiting">
<h3>Cohabiting<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/cohabiting</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="common_law_partnership">
<h3>Common law partnership<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/common_law_partnership</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="confucianism">
<h3>Confucianism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/confucianism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="divorced">
<h3>Divorced<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/divorced</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="divorced_couple_sharing_house">
<h3>Divorced couple sharing house<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/divorced_couple_sharing_house</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="domestic_partnership">
<h3>Domestic partnership<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/domestic_partnership</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="elderly_relative_lives_with_family">
<h3>Elderly relative lives with family<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/elderly_relative_lives_with_family</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="eloped">
<h3>Eloped<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/eloped</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="engaged_to_be_married">
<h3>Engaged to be married<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/engaged_to_be_married</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="ethnic_religion">
<h3>Ethnic Religion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/ethnic_religion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="feminine_gender">
<h3>Feminine gender<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/feminine_gender</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="gender_unknown">
<h3>Gender unknown<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/gender_unknown</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="gender_unspecified">
<h3>Gender unspecified<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/gender_unspecified</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="hinduism">
<h3>Hinduism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hinduism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="hinduism_other">
<h3>Hinduism: Other<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hinduism_other</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="shaivism">
<h3>Hinduism: Shaivism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/shaivism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="vaishnavism">
<h3>Hinduism: Vaishnavism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/vaishnavism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="hispanic">
<h3>Hispanic<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/hispanic</p>
<div class="comment">
<span class="markdown">Hispanic (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="homosexual_marriage">
<h3>Homosexual marriage<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/homosexual_marriage</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="homosexual_marriage_female">
<h3>Homosexual marriage, female<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/homosexual_marriage_female</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="homosexual_marriage_male">
<h3>Homosexual marriage, male<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/homosexual_marriage_male</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="husband_left_home">
<h3>Husband left home<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/husband_left_home</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="indian">
<h3>Indian<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/indian</p>
<div class="comment">
<span class="markdown">Indian (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="infant">
<h3>Infant<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/infant</p>
<div class="comment">
<span class="markdown">0-1 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="medication_provisioning">
<h3>Intervention by provisioning a medication<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/medication_provisioning</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="procedure_provisioning">
<h3>Intervention by provisioning a procedure<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/procedure_provisioning</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="social_action_provisioning">
<h3>Intervention by provisioning a social action<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/social_action_provisioning</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionByProvisioning"
title="http://research.ibm.com/ontologies/hspo/InterventionByProvisioning">Intervention by Provisioning</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="jainism">
<h3>Jainism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/jainism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="judaism">
<h3>Judaism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/judaism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="conservative_judaism">
<h3>Judaism: Conservative Judaism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/conservative_judaism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="jewish_renewal">
<h3>Judaism: Jewish Renewal<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/jewish_renewal</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="orthodox_judaism">
<h3>Judaism: Orthodox Judaism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/orthodox_judaism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="judaism_other">
<h3>Judaism: Other<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/judaism_other</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="reconstructionist_judaism">
<h3>Judaism: Reconstructionist Judaism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/reconstructionist_judaism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="reform_judaism">
<h3>Judaism: Reform Judaism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/reform_judaism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="legally_separated_with_interlocutory_decree">
<h3>Legally separated with interlocutory decree<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/legally_separated_with_interlocutory_decree</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_alone">
<h3>Lives alone<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_alone</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_alone_help_available">
<h3>Lives alone, help available<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_alone_help_available</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_alone_needs_housekeeper">
<h3>Lives alone, needs housekeeper<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_alone_needs_housekeeper</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_alone_no_help_available">
<h3>Lives alone, no help available<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_alone_no_help_available</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_as_companion">
<h3>Lives as companion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_as_companion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_as_paid_companion">
<h3>Lives as paid companion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_as_paid_companion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_as_unpaid_companion">
<h3>Lives as unpaid companion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_as_unpaid_companion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_in_a_commune">
<h3>Lives in a commune<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_in_a_commune</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_in_a_community">
<h3>Lives in a community<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_in_a_community</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_in_a_school_community">
<h3>Lives in a school community<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_in_a_school_community</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_in_boarding_school">
<h3>Lives in boarding school<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_in_boarding_school</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_children">
<h3>Lives with children<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_children</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_companion">
<h3>Lives with companion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_companion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_daughter">
<h3>Lives with daughter<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_daughter</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_family">
<h3>Lives with family<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_family</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_father">
<h3>Lives with father<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_father</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_friends">
<h3>Lives with friends<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_friends</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_grandfather">
<h3>Lives with grandfather<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_grandfather</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_grandmother">
<h3>Lives with grandmother<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_grandmother</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_grandparents">
<h3>Lives with grandparents<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_grandparents</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_husband">
<h3>Lives with husband<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_husband</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_lodger">
<h3>Lives with lodger<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_lodger</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_mother">
<h3>Lives with mother<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_mother</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_parents">
<h3>Lives with parents<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_parents</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_partner">
<h3>Lives with partner<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_partner</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_roommate">
<h3>Lives with roommate<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_roommate</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_son">
<h3>Lives with son<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_son</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_spouse">
<h3>Lives with spouse<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_spouse</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_spouse_only">
<h3>Lives with spouse only<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_spouse_only</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="lives_with_wife">
<h3>Lives with wife<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/lives_with_wife</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="living_temporarily_with_relatives">
<h3>Living temporarily with relatives<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/living_temporarily_with_relatives</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Household"
title="http://research.ibm.com/ontologies/hspo/Household">Household Composition</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="marital_state_unknown">
<h3>Marital state unknown<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/marital_state_unknown</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="marriage_annulment">
<h3>Marriage annulment<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/marriage_annulment</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="married">
<h3>Married<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/married</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="masculine_gender">
<h3>Masculine gender<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/masculine_gender</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="middle_age_adult">
<h3>Middle age adult<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/middle_age_adult</p>
<div class="comment">
<span class="markdown">40-59 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="monogamous">
<h3>Monogamous<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/monogamous</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="muslim">
<h3>Muslim<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/muslim</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="muslim_other">
<h3>Muslim: Other<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/muslim_other</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="shia_islam">
<h3>Muslim: Shia Islam<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/shia_islam</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="sunni_islam">
<h3>Muslim: Sunni Islam<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/sunni_islam</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="native_american">
<h3>Native American<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/native_american</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="new_religion">
<h3>New Religion Movement<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/new_religion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="newly_wed">
<h3>Newly wed<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/newly_wed</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="nonreligious">
<h3>Non religious<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/nonreligious</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="non_binary_gender">
<h3>Non-binary gender<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/non_binary_gender</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="ongoing_intervention">
<h3>Ongoing intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/ongoing_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="other_religion">
<h3>Other religion<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/other_religion</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="planned_intervention">
<h3>Planned intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/planned_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="polygamous">
<h3>Polygamous<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/polygamous</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="purposely_unmarried_and_sexually_abstinent">
<h3>Purposely unmarried and sexually abstinent<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/purposely_unmarried_and_sexually_abstinent</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="race_not_stated">
<h3>Race not stated<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/race_not_stated</p>
<div class="comment">
<span class="markdown">Race not stated (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="recommended_intervention">
<h3>Recommended intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/recommended_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="rejected_intervention">
<h3>Rejected intervention<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/rejected_intervention</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#InterventionStatus"
title="http://research.ibm.com/ontologies/hspo/InterventionStatus">Intervention Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="religion_unknown">
<h3>Religion is unknown<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/religion_unknown</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="remarried">
<h3>Remarried<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/remarried</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="senior_adult">
<h3>Senior Adult<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/senior_adult</p>
<div class="comment">
<span class="markdown">60+ years old adult</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="separated">
<h3>Separated<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/separated</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="separated_from_cohabitee">
<h3>Separated from cohabitee<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/separated_from_cohabitee</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="shinto">
<h3>Shinto or Shintoism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/shinto</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="sikhism">
<h3>Sikhism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/sikhism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="single_person">
<h3>Single person<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/single_person</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="single_never_married">
<h3>Single, never married<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/single_never_married</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="spinster">
<h3>Spinster<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/spinster</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="spiritualism">
<h3>Spiritualism<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/spiritualism</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Religion"
title="http://research.ibm.com/ontologies/hspo/Religion">Religion</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="spouse_left_home">
<h3>Spouse left home<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/spouse_left_home</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="transgender_female_to_male">
<h3>Surgically transgendered transsexual, female-to-male<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/transgender_female_to_male</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="transgender_male_to_female">
<h3>Surgically transgendered transsexual, male-to-female<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/transgender_male_to_female</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="teen">
<h3>Teenager<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/teen</p>
<div class="comment">
<span class="markdown">13-19 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="toddler">
<h3>Toddler<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/toddler</p>
<div class="comment">
<span class="markdown">2-4 years old</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#StageOfLife"
title="http://research.ibm.com/ontologies/hspo/StageOfLife">Stage of life</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="transgender">
<h3>Transgender<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/transgender</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#Gender" title="http://research.ibm.com/ontologies/hspo/Gender">Gender</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="trial_separation">
<h3>Trial separation<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/trial_separation</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="under_five">
<h3>Under 5<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/under_five</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#AgeGroup" title="http://research.ibm.com/ontologies/hspo/AgeGroup">Age group</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="race_unknown">
<h3>Unknown racial group<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/race_unknown</p>
<div class="comment">
<span class="markdown">Unknown racial group (racial group)</span>
</div>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#RaceAndEthnicity"
title="http://research.ibm.com/ontologies/hspo/RaceAndEthnicity">Race and Ethnicity</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="widow">
<h3>Widow<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/widow</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="widowed">
<h3>Widowed<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/widowed</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="widower">
<h3>Widower<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/widower</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
<div class="entity" id="wife_left_home">
<h3>Wife left home<sup class="type-ni" title="named individual">ni</sup>
<span class="backlink"> back to <a href="#toc">ToC</a> or <a href="#namedindividuals">Named Individual ToC</a>
</span>
</h3>
<p>
<strong>IRI:</strong> http://research.ibm.com/ontologies/hspo/wife_left_home</p>
<dl class="description">
<dt>belongs to</dt>
<dd>
<a href="#MaritalStatus"
title="http://research.ibm.com/ontologies/hspo/MaritalStatus">Marital Status</a>
<sup class="type-c" title="class">c</sup>
</dd>
</dl>
</div>
</div><div id="legend">
<h2>Legend <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<div class="entity">
<sup class="type-c" title="Classes">c</sup>: Classes <br/>
<sup class="type-op" title="Object Properties">op</sup>: Object Properties <br/>
<sup class="type-dp" title="Data Properties">dp</sup>: Data Properties <br/>
<sup class="type-ni" title="Named Individuals">ni</sup>: Named Individuals
</div>
</div>
</div>
<!--REFERENCES SECTION-->
<div id="references">
<h2 id="ref" class="list">References <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<span class="markdown">
Add your references here. It is recommended to have them as a list.</span>
</div>
<div id="acknowledgments">
<h2 id="ack" class="list">Acknowledgments <span class="backlink"> back to <a href="#toc">ToC</a></span></h2>
<p>
The authors would like to thank <a href="http://www.essepuntato.it/">Silvio Peroni</a> for developing <a href="http://www.essepuntato.it/lode">LODE</a>, a Live OWL Documentation Environment, which is used for representing the Cross Referencing Section of this document and <a href="https://w3id.org/people/dgarijo">Daniel Garijo</a> for developing <a href="https://github.com/dgarijo/Widoco">Widoco</a>, the program used to create the template used in this documentation.</p>
</div>
</div>
</body>
</html> | 397,618 | 43.701405 | 694 | html |
null | hspo-ontology-main/docs/ontology-specification/webvowl/index.html | <!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta name="author" content="Vincent Link, Steffen Lohmann, Eduard Marbach, Stefan Negru, Vitalis Wiens" />
<meta name="keywords" content="webvowl, vowl, visual notation, web ontology language, owl, rdf, ontology visualization, ontologies, semantic web" />
<meta name="description" content="WebVOWL - Web-based Visualization of Ontologies" />
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" type="text/css" href="css/webvowl.css" />
<link rel="stylesheet" type="text/css" href="css/webvowl.app.css" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<title>WebVOWL</title>
</head>
<body>
<main>
<section id="canvasArea">
<div id="browserCheck" class="hidden">
WebVOWL does not work properly in Internet Explorer and Microsoft Edge.
Please use another browser, such as
<a href="http://www.mozilla.org/firefox/">Mozilla Firefox</a>
or
<a href="https://www.google.com/chrome/">Google Chrome</a>,
to run WebVOWL.
<label id="killWarning">Hide warning</label>
</div>
<div id="logo" class="noselect">
<h2>WebVOWL
<br> <span>1.1.7</span>
</h2>
</div>
<div id="loading-info" class="hidden">
<div id="loading-progress" style="border-radius: 10px;">
<div class="hidden">Loading ontology...</div>
<div id="layoutLoadingProgressBarContainer" style="padding-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<h4 id="currentLoadingStep" style="margin: 0;font-style: italic; padding-bottom:0 ; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
Layout optimization</h4>
<div id="progressBarContext">
<div id="progressBarValue" class="busyProgressBar"></div>
</div>
</div>
<div id="loadingInfo_msgBox" style="padding-bottom: 0;padding-top:0">
<div id="show-loadingInfo-button" class="accordion-trigger noselect">Details</div>
<div id="loadingInfo-container">
<ul id="bulletPoint_container"></ul>
</div>
</div>
<div>
<span id="loadingIndicator_closeButton" class="">Close Warning</span>
</div>
</div>
</div>
<div id="additionalInformationContainer">
<div id="reloadCachedOntology" class="hidden" title="">
<svg viewBox="38 -12.5 18 18" class="reloadCachedOntologyIcon btn_shadowed" id="reloadSvgIcon">
<g>
<text id="svgStringText" dx="5px" dy="-1px" style="font-size:9px;">Reload ontology</text>
<path style="fill : #444; stroke-width:0;" d="m 42.277542,5.1367119 c -5.405,0 -10.444,1.577 -14.699,4.282 l -5.75,-5.75 0,16.1100001 16.11,0 -6.395,-6.395 c 3.18,-1.787 6.834,-2.82 10.734,-2.82 12.171,0 22.073,9.902 22.073,22.074 0,2.899 -0.577,5.664 -1.599,8.202 l 4.738,2.762 c 1.47,-3.363 2.288,-7.068 2.288,-10.964 0,-15.164 -12.337,-27.5010001 -27.5,-27.5010001 m 11.5,46.7460001 c -3.179,1.786 -6.826,2.827 -10.726,2.827 -12.171,0 -22.073,-9.902 -22.073,-22.073 0,-2.739 0.524,-5.35 1.439,-7.771 l -4.731,-2.851 c -1.375,3.271 -2.136,6.858 -2.136,10.622 0,15.164 12.336,27.5 27.5,27.5 5.406,0 10.434,-1.584 14.691,-4.289 l 5.758,5.759 0,-16.112 -16.111,0 6.389,6.388 z" transform="matrix(0.20,0,0,0.20,75,-10)">
</path>
</g>
</svg>
<span id="reloadCachedOntologyString" class="noselect" style="font-style: italic;font-size: 10px">Loaded cached ontology</span>
</div>
<div id="FPS_Statistics" class="hidden debugOption">FPS: 0<br>Nodes: 0<br>Links: 0</div>
<span class="hidden debugOption" id="modeOfOperationString">mode of operation</span>
</div>
<div id="graph"></div>
<div id="dragDropContainer" class="hidden">
<div id="drag_dropOverlay"></div>
<div id="drag_msg">
<svg id="drag_svg" style="position: absolute; left:25%;top:25%;width:50%; height:50%">
<g id="drag_icon_group">
<path id="drag_icon" style="fill : #444; stroke-width:0;" d="m 9.0000002,-8.9899999 -18.0000001,0 c -1.1000001,0 -1.9999991,0.9 -1.9999991,2 l 0,3.99 1.9999991,0 0,-4.01 18.0000001,0 0,14.0299996 -18.0000001,0 0,-4.02 -1.9999991,0 0,4.01 c 0,1.1 0.899999,1.98 1.9999991,1.98 l 18.0000001,0 c 1.1000008,0 2.0000008,-0.88 2.0000008,-1.98 l 0,-13.9999996 c 0,-1.11 -0.9,-2 -2.0000008,-2 z M -1,3.9999997 3.0000001,-3.3898305e-7 -1,-3.9999999 l 0,2.9999996 -9.999999,0 0,1.99999996 9.999999,0 0,3.00000004 z" transform="matrix(5.0,0,0,5.0,0,0)">
</path>
<path id="drag_icon_drop" class="hidden" style="fill : #444; stroke-width:0;" d="m 8.9900008,8.9999991 0,-18.0000001 c 0,-1.1 -0.9,-1.999999 -2,-1.999999 l -3.99,0 0,1.999999 4.01,0 0,18.0000001 -14.0299996,0 0,-18.0000001 4.02,0 0,-1.999999 -4.01,0 c -1.1,0 -1.98,0.899999 -1.98,1.999999 l 0,18.0000001 c 0,1.1000009 0.88,2.0000009 1.98,2.0000009 l 13.9999996,0 c 1.11,0 2,-0.9 2,-2.0000009 z M -3.9999988,-1.0000011 1.2389831e-6,2.999999 4.0000008,-1.0000011 l -2.9999996,0 0,-9.9999989 -1.99999996,0 0,9.9999989 -3.00000004,0 z" transform="matrix(5.0,0,0,5.0,0,0)">
</path>
</g>
</svg>
<span id="drag_msg_text" style="font-size:14px">Drag ontology file here.</span>
</div>
</div>
<div class="noselect">
<span id="leftSideBarCollapseButton" class="btn_shadowed hidden"> > </span>
</div>
<div class="noselect"><span id="sidebarExpandButton" class="btn_shadowed"> > </span></div>
<div id="containerForLeftSideBar">
<div id="leftSideBar">
<div id="leftSideBarContent" class="hidden">
<h2 id="leftHeader">Default Element</h2>
<h3 class=" selectedDefaultElement accordion-trigger noselect accordion-trigger-active" id="defaultClass" title="owl:Class">Class: owl:Class
</h3>
<div id="classContainer" class="accordion-container ">
</div>
<h3 class="selectedDefaultElement accordion-trigger noselect accordion-trigger-active" title="owl:objectProperty" id="defaultProperty">Property: owl:objectProperty
</h3>
<div id="propertyContainer" class="accordion-container ">
</div>
<h3 class="selectedDefaultElement accordion-trigger noselect accordion-trigger-active" title="rdfs:Literal" id="defaultDatatype">Datatype: rdfs:Literal
</h3>
<div id="datatypeContainer" class="accordion-container ">
</div>
</div>
</div>
</div>
<div id="menuContainer">
<!--Ontology Menu-->
<ul id="m_select" class="toolTipMenu noselect">
<li><a href="#foaf" id="foaf">Friend of a Friend (FOAF) vocabulary</a></li>
<li><a href="#goodrelations" id="goodrelations">GoodRelations Vocabulary for E-Commerce</a></li>
<li><a href="#muto" id="muto">Modular and Unified Tagging Ontology (MUTO)</a></li>
<li><a href="#ontovibe" id="ontovibe">Ontology Visualization Benchmark (OntoViBe)</a></li>
<li><a href="#personasonto" id="personasonto">Personas Ontology (PersonasOnto)</a></li>
<li><a href="#sioc" id="sioc">SIOC (Semantically-Interlinked Online Communities) Core Ontology</a></li>
<li class="option" id="converter-option">
<form class="converter-form" id="iri-converter-form">
<label for="iri-converter-input">Custom Ontology:</label>
<input type="text" id="iri-converter-input" placeholder="Enter ontology IRI">
<button type="submit" id="iri-converter-button" disabled>Visualize</button>
</form>
<div class="converter-form">
<input class="hidden" type="file" id="file-converter-input" autocomplete="off">
<label class="truncate" id="file-converter-label" for="file-converter-input">Select ontology
file</label>
<button type="submit" id="file-converter-button" disabled>
Upload
</button>
</div>
<div id="emptyContainer">
<a href="#opts=editorMode=true;#new_ontology1" id="empty" style="pointer-events:none; padding-left:0">Create new ontology</a>
</div>
<div>
<!--<button class="debugOption" type="submit" id="direct-text-input">-->
<!--Direct input-->
<!--</button>-->
</div>
</li>
</ul>
<!--Export Menu-->
<ul id="m_export" class="toolTipMenu noselect">
<li><a href="#" download id="exportJson">Export as JSON</a></li>
<li><a href="#" download id="exportSvg">Export as SVG</a></li>
<li><a href="#" download id="exportTex">Export as TeX <label style="font-size: 10px">(alpha)</label></a>
</li>
<li><a href="#" download id="exportTurtle">Export as TTL <label style="font-size: 10px">(alpha)</label></a>
</li>
<li class="option" id="emptyLiHover">
<div>
<form class="converter-form" id="url-copy-form">
<label for="exportedUrl">Export as URL:</label>
<input type="text" id="exportedUrl" placeholder="#">
<button id="copyBt" title="Copy to clipboard">Copy</button>
</form>
</div>
</li>
</ul>
<!--Filter Menu-->
<ul id="m_filter" class="toolTipMenu noselect">
<li class="toggleOption" id="datatypeFilteringOption"></li>
<li class="toggleOption" id="objectPropertyFilteringOption"></li>
<li class="toggleOption" id="subclassFilteringOption"></li>
<li class="toggleOption" id="disjointFilteringOption"></li>
<li class="toggleOption" id="setOperatorFilteringOption"></li>
<li class="slideOption" id="nodeDegreeFilteringOption"></li>
</ul>
<!--Options Menu -->
<ul id="m_config" class="toolTipMenu noselect">
<li class="toggleOption" id="zoomSliderOption"></li>
<li class="slideOption" id="classSliderOption"></li>
<li class="slideOption" id="datatypeSliderOption"></li>
<li class="toggleOption" id="dynamicLabelWidth"></li>
<li class="slideOption" id="maxLabelWidthSliderOption"></li>
<li class="toggleOption" id="nodeScalingOption"></li>
<li class="toggleOption" id="compactNotationOption"></li>
<li class="toggleOption" id="colorExternalsOption"></li>
</ul>
<!--Modes Menu -->
<ul id="m_modes" class="toolTipMenu noselect">
<li class="toggleOption" id="editMode"></li>
<li class="toggleOption" id="pickAndPinOption"></li>
</ul>
<!--Debug Menu -->
<ul id="m_debug" class="toolTipMenu noselect">
<li class=" toggleOption" id="useAccuracyHelper"></li>
<li class=" toggleOption" id="showDraggerObject"></li>
<li class=" toggleOption" id="showFPS_Statistics"></li>
<li class=" toggleOption" id="showModeOfOperation"></li>
</ul>
<!--About Menu-->
<ul id="m_about" class="toolTipMenu">
<li><a href="license.txt" target="_blank">MIT License © 2014-2019</a></li>
<li id="credits" class="option">WebVOWL Developers:<br />
Vincent Link, Steffen Lohmann, Eduard Marbach, Stefan Negru, Vitalis Wiens
</li>
<li id="credits" class="option">WIDOCO integration:<br /> Daniel Garijo, Jacobus Geluk
</li>
<li><a href="http://vowl.visualdataweb.org/webvowl.html#releases" target="_blank">Version: <%= version
%><br />(release history)</a></li>
<li><a href="http://purl.org/vowl/" target="_blank">VOWL Specification »</a></li>
</ul>
<ul id="m_search" class="toolTipMenu"></ul>
</div>
<div class="noselect" id="swipeBarContainer">
<ul id="menuElementContainer">
<li id="c_search" class="inner-addon left-addon">
<i class="searchIcon">
<svg viewBox="0 0 24 24" height="100%" width="100%" style="pointer-events: none; display: block;">
<g>
<path id="magnifyingGlass" style="fill : #666; stroke-width:0;" d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z">
</path>
</g>
</svg>
</i>
<input class="searchInputText" type="text" id="search-input-text" placeholder="Search">
</li>
<li id="c_locate">
<a style="padding: 0 8px 5px 8px;" draggable="false" title="Nothing to locate, enter search term." href="#" id="locateSearchResult">⌖
</a>
</li>
<!--
<li id="c_select">
<a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i> Ontology</a>
</li>-->
<li id="c_export"><a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i> Export</a></li>
<li id="c_filter"><a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>Filter</a></li>
<li id="c_config"><a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="m 21.163138,13.127428 0,-2.356764 -2.546629,-0.424622 C 18.439272,9.5807939 18.137791,8.8661419 17.733863,8.218291 L 19.2356,6.116978 17.569296,4.450673 15.466841,5.951269 C 14.818953,5.548483 14.104338,5.24586 13.33909,5.067482 l -0.424622,-2.545488 -2.356764,0 -0.424622,2.545488 C 9.3689769,5.24586 8.6531829,5.548519 8.0053319,5.951269 l -2.102455,-1.500596 -1.666304,1.666305 1.501737,2.101313 c -0.403928,0.6467469 -0.705409,1.3625029 -0.882646,2.127751 l -2.546629,0.424622 0,2.356764 2.546629,0.424622 c 0.177237,0.765248 0.478718,1.4799 0.882646,2.127751 l -1.501737,2.102455 1.666304,1.666304 2.103596,-1.501737 c 0.646747,0.403928 1.362504,0.705409 2.1266091,0.882646 l 0.424622,2.546629 2.356764,0 0.424622,-2.546629 c 0.764106,-0.177237 1.4799,-0.478718 2.127751,-0.882646 l 2.102455,1.501737 1.666304,-1.666304 -1.501737,-2.102455 c 0.403928,-0.647888 0.705409,-1.363645 0.882646,-2.127751 l 2.546629,-0.424622 z m -9.427053,3.535144 c -2.6030431,0 -4.7135241,-2.110517 -4.7135241,-4.713527 0,-2.6030071 2.110518,-4.713525 4.7135241,-4.713525 2.60301,0 4.713527,2.1105179 4.713527,4.713525 0,2.60301 -2.110481,4.713527 -4.713527,4.713527 z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>Options</a>
</li>
<li id="c_modes"><a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>Modes</a></li>
<li id="c_reset"><a draggable="false" id="reset-button" href="#" type="reset">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="m 12,5 0,-4 5,5 -5,5 0,-4 c -3.31,0 -6,2.69 -6,6 0,3.31 2.69,6 6,6 3.31,0 6,-2.69 6,-6 l 2,0 c 0,4.42 -3.58,8 -8,8 C 7.58,21 4,17.42 4,13 4,8.58 7.58,5 12,5 Z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>Reset</a></li>
<li id="c_pause"><a draggable="false" id="pause-button" href="#" style="padding: 9px 8px 12px 8px;">Pause</a>
</li>
<li id="c_debug" class="debugOption"><a id="debugMenuHref" draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="M 20,8 17.19,8 C 16.74,7.22 16.12,6.55 15.37,6.04 L 17,4.41 15.59,3 13.42,5.17 C 12.96,5.06 12.49,5 12,5 11.51,5 11.04,5.06 10.59,5.17 L 8.41,3 7,4.41 8.62,6.04 C 7.88,6.55 7.26,7.22 6.81,8 L 4,8 4,10 6.09,10 C 6.04,10.33 6,10.66 6,11 l 0,1 -2,0 0,2 2,0 0,1 c 0,0.34 0.04,0.67 0.09,1 L 4,16 l 0,2 2.81,0 c 1.04,1.79 2.97,3 5.19,3 2.22,0 4.15,-1.21 5.19,-3 l 2.81,0 0,-2 -2.09,0 C 17.96,15.67 18,15.34 18,15 l 0,-1 2,0 0,-2 -2,0 0,-1 c 0,-0.34 -0.04,-0.67 -0.09,-1 L 20,10 Z m -4,4 0,3 c 0,0.22 -0.03,0.47 -0.07,0.7 L 15.83,16.35 15.46,17 C 14.74,18.24 13.42,19 12,19 10.58,19 9.26,18.23 8.54,17 L 8.17,16.36 8.07,15.71 C 8.03,15.47 8,15.22 8,15 L 8,11 C 8,10.78 8.03,10.53 8.07,10.3 L 8.17,9.65 8.54,9 C 8.84,8.48 9.26,8.03 9.75,7.69 L 10.32,7.3 11.06,7.12 C 11.37,7.04 11.69,7 12,7 c 0.32,0 0.63,0.04 0.95,0.12 l 0.68,0.16 0.61,0.42 c 0.5,0.34 0.91,0.78 1.21,1.31 l 0.38,0.65 0.1,0.65 C 15.97,10.53 16,10.78 16,11 Z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>
Debug</a></li>
<li id="c_about"><a draggable="false" href="#">
<i>
<svg viewBox="0 0 24 24" class="menuElementSvgElement">
<g>
<path style="fill : #fff; stroke-width:0;" d="m 10.08,10.86 c 0.05,-0.33 0.16,-0.62 0.3,-0.87 0.14,-0.25 0.34,-0.46 0.59,-0.62 0.24,-0.15 0.54,-0.22 0.91,-0.23 0.23,0.01 0.44,0.05 0.63,0.13 0.2,0.09 0.38,0.21 0.52,0.36 0.14,0.15 0.25,0.33 0.34,0.53 0.09,0.2 0.13,0.42 0.14,0.64 l 1.79,0 C 15.28,10.33 15.19,9.9 15.02,9.51 14.85,9.12 14.62,8.78 14.32,8.5 14.02,8.22 13.66,8 13.24,7.84 12.82,7.68 12.36,7.61 11.85,7.61 11.2,7.61 10.63,7.72 10.15,7.95 9.67,8.18 9.27,8.48 8.95,8.87 8.63,9.26 8.39,9.71 8.24,10.23 8.09,10.75 8,11.29 8,11.87 l 0,0.27 c 0,0.58 0.08,1.12 0.23,1.64 0.15,0.52 0.39,0.97 0.71,1.35 0.32,0.38 0.72,0.69 1.2,0.91 0.48,0.22 1.05,0.34 1.7,0.34 0.47,0 0.91,-0.08 1.32,-0.23 0.41,-0.15 0.77,-0.36 1.08,-0.63 0.31,-0.27 0.56,-0.58 0.74,-0.94 0.18,-0.36 0.29,-0.74 0.3,-1.15 l -1.79,0 c -0.01,0.21 -0.06,0.4 -0.15,0.58 -0.09,0.18 -0.21,0.33 -0.36,0.46 -0.15,0.13 -0.32,0.23 -0.52,0.3 -0.19,0.07 -0.39,0.09 -0.6,0.1 C 11.5,14.86 11.2,14.79 10.97,14.64 10.72,14.48 10.52,14.27 10.38,14.02 10.24,13.77 10.13,13.47 10.08,13.14 10.03,12.81 10,12.47 10,12.14 l 0,-0.27 c 0,-0.35 0.03,-0.68 0.08,-1.01 z M 12,2 C 6.48,2 2,6.48 2,12 2,17.52 6.48,22 12,22 17.52,22 22,17.52 22,12 22,6.48 17.52,2 12,2 Z m 0,18 C 7.59,20 4,16.41 4,12 4,7.59 7.59,4 12,4 c 4.41,0 8,3.59 8,8 0,4.41 -3.59,8 -8,8 z" transform="matrix(0.75,0,0,0.75,3.5,2.5)">
</path>
</g>
</svg>
</i>
About</a></li>
</ul>
</div>
<div class="noselect" id="scrollRightButton"></div>
<div class="noselect" id="scrollLeftButton"></div>
<div id="zoomSlider" class="btn_shadowed">
<p class="noselect" id="centerGraphButton">⌖</p>
<p class="noselect" id="zoomInButton">+</p>
<p class="noselect" id="zoomSliderParagraph"></p>
<p class="noselect" id="zoomOutButton">-</p>
</div>
</section>
<aside id="detailsArea" style="background-color: #18202A;">
<section id="generalDetailsEdit" class="hidden">
<h1 id="editHeader" style="font-size: 1.1em;">Editing Options</h1>
<h3 class="accordion-trigger noselect accordion-trigger-active">Ontology</h3>
<div>
<!--begin of ontology metaData -->
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="titleEditForm">
<label class="EditLabelForInput" id="titleEditor-label" for="titleEditor" title="Ontology title as dc:title">Title:</label>
<input class="modifiedInputStyle" type="text" id="titleEditor" autocomplete="off" value="">
</form>
</div>
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="iriEditForm">
<label class="EditLabelForInput" id="iriEditor-label" for="iriEditor">IRI:</label>
<input type="text" id="iriEditor" autocomplete="off" value="">
</form>
</div>
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="versionEditForm">
<label class="EditLabelForInput" id="versionEditor-label" for="versionEditor" title="Ontology version number as owl:versionInfo">Version:</label>
<input type="text" id="versionEditor" value="" autocomplete="off">
</form>
</div>
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="authorsEditForm">
<label class="EditLabelForInput" id="authorsEditor-label" for="authorsEditor" title="Ontology authors as dc:creator">Authors:</label>
<input type="text" id="authorsEditor" value="" autocomplete="off">
</form>
</div>
<h4 class="subAccordion accordion-trigger noselect">Prefix</h4>
<div class="subAccordionDescription" id="containerForPrefixURL">
<div id="prefixURL_Description">
<span class="boxed ">Prefix</span>
<span class="boxed">IRI</span>
</div>
<div id="prefixURL_Container"></div>
<div align="center" id="containerForAddPrefixButton">
<button id="addPrefixButton">Add Prefix</button>
</div>
</div>
</div>
<!--end of ontology metaData -->
<h3 class="accordion-trigger noselect">Description</h3>
<div>
<textarea rows="4" cols="25" title="Ontology description as dc:description" class="descriptionTextClass" id="descriptionEditor"></textarea>
</div>
<h3 class="accordion-trigger noselect accordion-trigger-active">Selected Element</h3>
<div>
<div id="selectedElementProperties" class="hidden">
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="element_iriEditForm">
<label class="EditLabelForInput" id="element_iriEditor-label" for="element_iriEditor">IRI:</label>
<input type="text" id="element_iriEditor" autocomplete="off" value="">
</form>
</div>
<div class="textLineEditWithLabel">
<form class="converter-form-Editor " id="element_labelEditForm">
<label class="EditLabelForInput" id="element_labelEditor-label" for="element_labelEditor">Label:</label>
<input type="text" id="element_labelEditor" autocomplete="off" value="">
</form>
</div>
<div class="textLineEditWithLabel">
<form class="converter-form-Editor" id="typeEditForm">
<label class="EditLabelForInput" id="typeEditor-label" for="typeEditor">Type:</label>
<select id="typeEditor" class="dropdownMenuClass"></select>
</form>
<form class="converter-form-Editor" id="typeEditForm_datatype">
<label class="EditLabelForInput" id="typeEditor_datatype-label" for="typeEditor_datatype">Datatype:</label>
<select id="typeEditor_datatype" class="dropdownMenuClass"></select>
</form>
</div>
<div class="textLineEditWithLabel" id="property_characteristics_Container"> Characteristics:
<div id="property_characteristics_Selection" style="padding-top:2px;"></div>
</div>
</div>
<div id="selectedElementPropertiesEmptyHint">
Select an element in the visualization.
</div>
</div>
</section>
<section id="generalDetails" class="hidden">
<h1 id="title"></h1>
<span><a id="about" href=""></a></span>
<h5>Version: <span id="version"></span></h5>
<h5>Author(s): <span id="authors"></span></h5>
<h5>
<label>Language: <select id="language" name="language" size="1"></select></label>
</h5>
<h3 class="accordion-trigger noselect accordion-trigger-active">Description</h3>
<div class="accordion-container scrollable">
<p id="description"></p>
</div>
<h3 class="accordion-trigger noselect">Metadata</h3>
<div id="ontology-metadata" class="accordion-container"></div>
<h3 class="accordion-trigger noselect">Statistics</h3>
<div class="accordion-container">
<p class="statisticDetails">Classes: <span id="classCount"></span></p>
<p class="statisticDetails">Object prop.: <span id="objectPropertyCount"></span></p>
<p class="statisticDetails">Datatype prop.: <span id="datatypePropertyCount"></span></p>
<div class="small-whitespace-separator"></div>
<p class="statisticDetails">Individuals: <span id="individualCount"></span></p>
<div class="small-whitespace-separator"></div>
<p class="statisticDetails">Nodes: <span id="nodeCount"></span></p>
<p class="statisticDetails">Edges: <span id="edgeCount"></span></p>
</div>
<h3 class="accordion-trigger noselect" id="selection-details-trigger">Selection Details</h3>
<div class="accordion-container" id="selection-details">
<div id="classSelectionInformation" class="hidden">
<p class="propDetails">Name: <span id="name"></span></p>
<p class="propDetails">Type: <span id="typeNode"></span></p>
<p class="propDetails">Equiv.: <span id="classEquivUri"></span></p>
<p class="propDetails">Disjoint: <span id="disjointNodes"></span></p>
<p class="propDetails">Charac.: <span id="classAttributes"></span></p>
<p class="propDetails">Individuals: <span id="individuals"></span></p>
<p class="propDetails">Description: <span id="nodeDescription"></span></p>
<p class="propDetails">Comment: <span id="nodeComment"></span></p>
</div>
<div id="propertySelectionInformation" class="hidden">
<p class="propDetails">Name: <span id="propname"></span></p>
<p class="propDetails">Type: <span id="typeProp"></span></p>
<p id="inverse" class="propDetails">Inverse: <span></span></p>
<p class="propDetails">Domain: <span id="domain"></span></p>
<p class="propDetails">Range: <span id="range"></span></p>
<p class="propDetails">Subprop.: <span id="subproperties"></span></p>
<p class="propDetails">Superprop.: <span id="superproperties"></span></p>
<p class="propDetails">Equiv.: <span id="propEquivUri"></span></p>
<p id="infoCardinality" class="propDetails">Cardinality: <span></span></p>
<p id="minCardinality" class="propDetails">Min. cardinality: <span></span></p>
<p id="maxCardinality" class="propDetails">Max. cardinality: <span></span></p>
<p class="propDetails">Charac.: <span id="propAttributes"></span></p>
<p class="propDetails">Description: <span id="propDescription"></span></p>
<p class="propDetails">Comment: <span id="propComment"></span></p>
</div>
<div id="noSelectionInformation">
<p><span>Select an element in the visualization.</span></p>
</div>
</div>
</section>
</aside>
<div id="blockGraphInteractions" class="hidden"></div>
<div id="WarningErrorMessagesContainer" class="">
<div id="WarningErrorMessages" class="">
</div>
</div>
<div id="DirectInputContent" class="hidden">
<div id="direct-text-input-container">
<textarea rows="4" cols="25" title="Direct Text input as JSON(experimental)" class="directTextInputStyle" id="directInputTextArea"></textarea>
<div id="di_controls">
<ul>
<li>
<button id="directUploadBtn">Upload</button>
</li>
<li>
<button id="close_directUploadBtn">Close</button>
</li>
<li id="Error_onLoad" class="hidden">Some text if ERROR</li>
</ul>
</div>
</div>
</div>
</main>
<script src="js/d3.min.js"></script>
<script src="js/webvowl.js"></script>
<script src="js/webvowl.app.js"></script>
<script>
window.onload = webvowl.app().initialize;
</script>
</body>
</html>
| 35,533 | 67.998058 | 1,383 | html |
null | hspo-ontology-main/kg-embedding/gnn-models/mimic/run_experiments.sh | #!/bin/bash
############################################################
# Help #
############################################################
Help()
{
# Display Help
echo "Description of parameters."
echo
echo "Example: run_experiments.sh -d 0 -s 'lm' -a 'cls' -o 1 -l 1 -b 32 -m '1_2' -u 1 -n 5 -r 0.001 -w 0.0005 -e 100 -x 1"
echo "Parameters:"
echo "h Call the help function."
echo "d Directed (1) or Undected graph (0). Values: 0 or 1"
echo "s Embedding strategy. Values: 'bow' or 'lm'"
echo "a Aggregation strategy. Values: 'cls', 'avg', 'sum', '_'"
echo "o Graph version. Values: {1, 2, 3, 4, 5, 6, (7)}"
echo "l Adding a self loop (1) in the graph or no (0). Values: 0 or 1"
echo "b The batch size, e.g. 32, 64, etc."
echo "m The model id. Values: 1_1, 1_2, 2_1, 2_2"
echo "u Using bases (1) or no (0). Values: 0 or 1"
echo "n The number of bases, if some are used. e.g. 5"
echo "r The learning rate for training. e.g. 0.001"
echo "w The weight decay parameter. e.g. 0.0005"
echo "e The number of training epochs. e.g. 100"
echo "x The experiment id"
}
usage="$(basename "$0") [-h] [-in d s a o l b m u n r w e x] -- program to run the experiment pipeline"
if [ "$1" == "-h" ] ; then
echo "$usage"
Help
exit 0
fi
# A string with command options
options=$@
while getopts d:s:a:o:l:b:m:u:n:r:w:e:x: options
do
case "${options}" in
d) directed=${OPTARG};;
s) emb_strategy=${OPTARG};;
a) aggr_strategy=${OPTARG};;
o) graph_version=${OPTARG};;
l) add_self_loop=${OPTARG};;
b) batch_size=${OPTARG};;
m) model_id=${OPTARG};;
u) use_bases=${OPTARG};;
n) num_bases=${OPTARG};;
r) learning_rate=${OPTARG};;
w) weight_decay=${OPTARG};;
e) epochs=${OPTARG};;
x) exp_id=${OPTARG};;
esac
done
source /opt/share/anaconda3-2019.03/x86_64/etc/profile.d/conda.sh
conda conda_envs/pytorch
if [ $directed -eq 1 ]
then
direction='directed'
else
direction='undirected'
fi
if [ $emb_strategy = 'bow' ]
then
input_path_graphs='../../transformation/mimic/data/processed_graphs/use_case_428_427/'${direction}'/'${emb_strategy}'/v'${graph_version}'/'
else
input_path_graphs='../../transformation/mimic/data/processed_graphs/use_case_428_427/'${direction}'/'${emb_strategy}'/'${aggr_strategy}'/v'${graph_version}'/'
fi
for splits in {0..9}
do
for cv_splits in {0..4}
do
input_path_data_files='use_case_428_427_data_splits/split_'${splits}'/cv_split_'${cv_splits}'.json'
output_path='saved_models/use_case_428_427/exp_'${exp_id}'/'${direction}'/'${emb_strategy}'/v'${graph_version}'/'${model_id}'/split_'${splits}'/cv_split_'${cv_splits}'/'
jbsub -mem 16g -q x86_24h -cores 1+1 python main.py --input_path_data_files $input_path_data_files --input_path_graphs $input_path_graphs --directed $directed --add_self_loop $add_self_loop --batch_size $batch_size --model_id $model_id --use_bases $use_bases --num_bases $num_bases --learning_rate $learning_rate --weight_decay $weight_decay --epochs $epochs --output_path $output_path
done
done
| 3,271 | 36.181818 | 393 | sh |
null | hspo-ontology-main/kg-embedding/transformation/mimic/run_graph_processing.sh | #!/bin/bash
############################################################
# Help #
############################################################
Help()
{
# Display Help
echo "Description of parameters."
echo
echo "Example: run_graph_processing.sh -g 1 -f 1 -v 1 -e 1 -p 1 -d 0 -o 1 -s 'bow' -a '_'"
echo "Parameters:"
echo "h Call the help function."
echo "g Run the 'graph_transformation' script. Values: 0 or 1"
echo "f Run the 'find_graphs_with_missing_info_v1' script. Values: 0 or 1"
echo "v Run the 'vocabulary' script. Values: 0 or 1"
echo "e Run the 'embedding_initialization' script. Values: 0 or 1"
echo "p Run the 'graph_preprocessing' script. Values: 0 or 1"
echo "d Directed (1) or Undected graph (0). Values: 0 or 1"
echo "o Graph version. Values: {1, 2, 3, 4, 5, 6, (7)}"
echo "s Embedding strategy. Values: 'bow' or 'lm'"
echo "a Aggregation strategy. Values: 'cls', 'avg', 'sum', '_'"
}
usage="$(basename "$0") [-h] [-g f v e p d o s a] -- program to run the graph processing pipeline"
if [ "$1" == "-h" ] ; then
echo "$usage"
Help
exit 0
fi
# A string with command options
options=$@
while getopts g:f:v:e:p:d:o:s:a: options
do
case "${options}" in
g) graph_transformation=${OPTARG};;
f) finding_missing_info=${OPTARG};;
v) vocabulary_creation=${OPTARG};;
e) emb_extraction=${OPTARG};;
p) graph_preprocessing=${OPTARG};;
d) directed=${OPTARG};;
o) graph_version=${OPTARG};;
s) emb_strategy=${OPTARG};;
a) aggr_strategy=${OPTARG};;
esac
done
source /opt/share/anaconda3-2019.03/x86_64/etc/profile.d/conda.sh
conda activate conda_envs/rdflib
if [ $graph_transformation -eq 1 ]
then
echo 'Graph transformation is starting ...'
input_path_graph_transformation='data/with_new_URI/'
output_path_graph_transformation='data/triplet_format_graphs/'
python 1_graph_transformation.py --input_path $input_path_graph_transformation --output_path $output_path_graph_transformation --directed $directed --graph_version $graph_version
echo 'Graph transformation is completed.'
fi
if [ $finding_missing_info -eq 1 ]
then
if [ $directed -eq 0 ] && [ $graph_version -eq 1 ]
then
input_path_missing_info='data/triplet_format_graphs/'
python 2_find_graphs_with_missing_info_v4.py --input_path $input_path_missing_info
fi
fi
conda deactivate
conda activate conda_envs/spacy
if [ $vocabulary_creation -eq 1 ]
then
echo 'Vocabulary creation is starting ...'
input_path_grouped_data='../../../hspo-kg-builder/data-lifting/mimic/data/processed_data/4_data_after_adding_notes_info_grouped_icd9.json'
input_path_graphs='data/triplet_format_graphs/'
extra_filter=1
python 3_vocabulary.py --input_path_grouped_data $input_path_grouped_data --input_path_graphs $input_path_graphs --directed $directed --graph_version $graph_version --extra_filter $extra_filter
echo 'Vocabulary creation is completed.'
fi
if [ $emb_extraction -eq 1 ]
then
echo 'Embedding initialization is starting ...'
input_path_grouped_data='../../../hspo-kg-builder/data-lifting/mimic/data/processed_data/4_data_after_adding_notes_info_grouped_icd9.json'
input_path_graphs='data/triplet_format_graphs/'
output_path_emb='data/precalculated_embeddings/use_case_428_427/'
extra_filter=1
if [ $directed -eq 1 ]
then
vocab_path='data/vocabularies/vocab_list_use_case_428_427_spacy_directed_v'${graph_version}'_without_missing_info.json'
else
vocab_path='data/vocabularies/vocab_list_use_case_428_427_spacy_undirected_v'${graph_version}'_without_missing_info.json'
fi
python 4_embedding_initialization.py --input_path_grouped_data $input_path_grouped_data --input_path_graphs $input_path_graphs --output_path $output_path_emb --directed $directed --graph_version $graph_version --vocab_path $vocab_path --extra_filter $extra_filter --emb_strategy $emb_strategy --aggr_strategy $aggr_strategy
echo 'Embedding initialization is completed.'
fi
conda deactivate
conda activate conda_envs/pytorch
if [ $graph_preprocessing -eq 1 ]
then
echo 'Graph preprocessing is starting ...'
if [ $directed -eq 1 ]
then
unique_rel_triplets_path='data/vocabularies/unique_rel_triplets_directed_v'${graph_version}'.json'
else
unique_rel_triplets_path='data/vocabularies/unique_rel_triplets_undirected_v'${graph_version}'.json'
fi
output_path_emb='data/precalculated_embeddings/use_case_428_427/'
output_path_processed_graphs='data/processed_graphs/use_case_428_427/'
if [ $emb_strategy = 'bow' ]
then
if [ $directed -eq 1 ]
then
vocab_path='data/vocabularies/vocab_list_use_case_428_427_spacy_directed_v'${graph_version}'_without_missing_info.json'
else
vocab_path='data/vocabularies/vocab_list_use_case_428_427_spacy_undirected_v'${graph_version}'_without_missing_info.json'
fi
else
vocab_path='_'
fi
python 5_graph_preprocessing.py --input_path_embeddings $output_path_emb --vocab_path $vocab_path --unique_rel_triplets_path $unique_rel_triplets_path --emb_strategy $emb_strategy --aggr_strategy $aggr_strategy --output_path $output_path_processed_graphs --directed $directed --graph_version $graph_version
echo 'Graph preprocessing is completed.'
fi | 5,503 | 38.314286 | 328 | sh |
IID_representation_learning | IID_representation_learning-master/restyle/models/stylegan2/op/fused_bias_act.cpp | #include <torch/extension.h>
torch::Tensor fused_bias_act_op(const torch::Tensor& input, const torch::Tensor& bias, const torch::Tensor& refer,
int act, int grad, float alpha, float scale);
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
torch::Tensor fused_bias_act(const torch::Tensor& input, const torch::Tensor& bias, const torch::Tensor& refer,
int act, int grad, float alpha, float scale) {
CHECK_CUDA(input);
CHECK_CUDA(bias);
return fused_bias_act_op(input, bias, refer, act, grad, alpha, scale);
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("fused_bias_act", &fused_bias_act, "fused bias act (CUDA)");
} | 826 | 38.380952 | 114 | cpp |
IID_representation_learning | IID_representation_learning-master/restyle/models/stylegan2/op/upfirdn2d.cpp | #include <torch/extension.h>
torch::Tensor upfirdn2d_op(const torch::Tensor& input, const torch::Tensor& kernel,
int up_x, int up_y, int down_x, int down_y,
int pad_x0, int pad_x1, int pad_y0, int pad_y1);
#define CHECK_CUDA(x) TORCH_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
torch::Tensor upfirdn2d(const torch::Tensor& input, const torch::Tensor& kernel,
int up_x, int up_y, int down_x, int down_y,
int pad_x0, int pad_x1, int pad_y0, int pad_y1) {
CHECK_CUDA(input);
CHECK_CUDA(kernel);
return upfirdn2d_op(input, kernel, up_x, up_y, down_x, down_y, pad_x0, pad_x1, pad_y0, pad_y1);
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("upfirdn2d", &upfirdn2d, "upfirdn2d (CUDA)");
} | 966 | 41.043478 | 99 | cpp |
mmdetection | mmdetection-master/.circleci/scripts/get_mmcv_var.sh | #!/bin/bash
TORCH=$1
CUDA=$2
# 10.2 -> cu102
MMCV_CUDA="cu`echo ${CUDA} | tr -d '.'`"
# MMCV only provides pre-compiled packages for torch 1.x.0
# which works for any subversions of torch 1.x.
# We force the torch version to be 1.x.0 to ease package searching
# and avoid unnecessary rebuild during MMCV's installation.
TORCH_VER_ARR=(${TORCH//./ })
TORCH_VER_ARR[2]=0
printf -v MMCV_TORCH "%s." "${TORCH_VER_ARR[@]}"
MMCV_TORCH=${MMCV_TORCH%?} # Remove the last dot
echo "export MMCV_CUDA=${MMCV_CUDA}" >> $BASH_ENV
echo "export MMCV_TORCH=${MMCV_TORCH}" >> $BASH_ENV
| 574 | 27.75 | 66 | sh |
mmdetection | mmdetection-master/.dev_scripts/linter.sh | yapf -r -i mmdet/ configs/ tests/ tools/
isort -rc mmdet/ configs/ tests/ tools/
flake8 .
| 90 | 21.75 | 40 | sh |
mmdetection | mmdetection-master/.dev_scripts/test_benchmark.sh | PARTITION=$1
CHECKPOINT_DIR=$2
echo 'configs/atss/atss_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION atss_r50_fpn_1x_coco configs/atss/atss_r50_fpn_1x_coco.py $CHECKPOINT_DIR/atss_r50_fpn_1x_coco_20200209-985f7bd0.pth --work-dir tools/batch_test/atss_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29666 &
echo 'configs/autoassign/autoassign_r50_fpn_8x2_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION autoassign_r50_fpn_8x2_1x_coco configs/autoassign/autoassign_r50_fpn_8x2_1x_coco.py $CHECKPOINT_DIR/auto_assign_r50_fpn_1x_coco_20210413_115540-5e17991f.pth --work-dir tools/batch_test/autoassign_r50_fpn_8x2_1x_coco --eval bbox --cfg-option dist_params.port=29667 &
echo 'configs/carafe/faster_rcnn_r50_fpn_carafe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_carafe_1x_coco configs/carafe/faster_rcnn_r50_fpn_carafe_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_carafe_1x_coco_bbox_mAP-0.386_20200504_175733-385a75b7.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_carafe_1x_coco --eval bbox --cfg-option dist_params.port=29668 &
echo 'configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION cascade_rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/cascade_rcnn_r50_fpn_1x_coco_20200316-3dc56deb.pth --work-dir tools/batch_test/cascade_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29669 &
echo 'configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION cascade_mask_rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/cascade_mask_rcnn_r50_fpn_1x_coco_20200203-9d4dcb24.pth --work-dir tools/batch_test/cascade_mask_rcnn_r50_fpn_1x_coco --eval bbox segm --cfg-option dist_params.port=29670 &
echo 'configs/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION crpn_faster_rcnn_r50_caffe_fpn_1x_coco configs/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco.py $CHECKPOINT_DIR/crpn_faster_rcnn_r50_caffe_fpn_1x_coco-c8283cca.pth --work-dir tools/batch_test/crpn_faster_rcnn_r50_caffe_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29671 &
echo 'configs/centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION centripetalnet_hourglass104_mstest_16x6_210e_coco configs/centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py $CHECKPOINT_DIR/centripetalnet_hourglass104_mstest_16x6_210e_coco_20200915_204804-3ccc61e5.pth --work-dir tools/batch_test/centripetalnet_hourglass104_mstest_16x6_210e_coco --eval bbox --cfg-option dist_params.port=29672 &
echo 'configs/cornernet/cornernet_hourglass104_mstest_8x6_210e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION cornernet_hourglass104_mstest_8x6_210e_coco configs/cornernet/cornernet_hourglass104_mstest_8x6_210e_coco.py $CHECKPOINT_DIR/cornernet_hourglass104_mstest_8x6_210e_coco_20200825_150618-79b44c30.pth --work-dir tools/batch_test/cornernet_hourglass104_mstest_8x6_210e_coco --eval bbox --cfg-option dist_params.port=29673 &
echo 'configs/dcn/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco configs/dcn/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco_20200130-d68aed1e.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco --eval bbox --cfg-option dist_params.port=29674 &
echo 'configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deformable_detr_r50_16x2_50e_coco configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py $CHECKPOINT_DIR/deformable_detr_r50_16x2_50e_coco_20210419_220030-a12b9512.pth --work-dir tools/batch_test/deformable_detr_r50_16x2_50e_coco --eval bbox --cfg-option dist_params.port=29675 &
echo 'configs/detectors/detectors_htc_r50_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION detectors_htc_r50_1x_coco configs/detectors/detectors_htc_r50_1x_coco.py $CHECKPOINT_DIR/detectors_htc_r50_1x_coco-329b1453.pth --work-dir tools/batch_test/detectors_htc_r50_1x_coco --eval bbox segm --cfg-option dist_params.port=29676 &
echo 'configs/detr/detr_r50_8x2_150e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION detr_r50_8x2_150e_coco configs/detr/detr_r50_8x2_150e_coco.py $CHECKPOINT_DIR/detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth --work-dir tools/batch_test/detr_r50_8x2_150e_coco --eval bbox --cfg-option dist_params.port=29677 &
echo 'configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION dh_faster_rcnn_r50_fpn_1x_coco configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/dh_faster_rcnn_r50_fpn_1x_coco_20200130-586b67df.pth --work-dir tools/batch_test/dh_faster_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29678 &
echo 'configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION dynamic_rcnn_r50_fpn_1x_coco configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/dynamic_rcnn_r50_fpn_1x-62a3f276.pth --work-dir tools/batch_test/dynamic_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29679 &
echo 'configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_attention_1111_1x_coco configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_attention_1111_1x_coco_20200130-403cccba.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_attention_1111_1x_coco --eval bbox --cfg-option dist_params.port=29680 &
echo 'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_1x_coco configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29681 &
echo 'configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco configs/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco.py $CHECKPOINT_DIR/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth --work-dir tools/batch_test/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco --eval bbox --cfg-option dist_params.port=29682 &
echo 'configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fovea_align_r50_fpn_gn-head_4x4_2x_coco configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py $CHECKPOINT_DIR/fovea_align_r50_fpn_gn-head_4x4_2x_coco_20200203-8987880d.pth --work-dir tools/batch_test/fovea_align_r50_fpn_gn-head_4x4_2x_coco --eval bbox --cfg-option dist_params.port=29683 &
echo 'configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION retinanet_free_anchor_r50_fpn_1x_coco configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py $CHECKPOINT_DIR/retinanet_free_anchor_r50_fpn_1x_coco_20200130-0f67375f.pth --work-dir tools/batch_test/retinanet_free_anchor_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29684 &
echo 'configs/fsaf/fsaf_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fsaf_r50_fpn_1x_coco configs/fsaf/fsaf_r50_fpn_1x_coco.py $CHECKPOINT_DIR/fsaf_r50_fpn_1x_coco-94ccc51f.pth --work-dir tools/batch_test/fsaf_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29685 &
echo 'configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco configs/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco_20200202-587b99aa.pth --work-dir tools/batch_test/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco --eval bbox segm --cfg-option dist_params.port=29686 &
echo 'configs/gfl/gfl_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION gfl_r50_fpn_1x_coco configs/gfl/gfl_r50_fpn_1x_coco.py $CHECKPOINT_DIR/gfl_r50_fpn_1x_coco_20200629_121244-25944287.pth --work-dir tools/batch_test/gfl_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29687 &
echo 'configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION mask_rcnn_r50_fpn_gn-all_2x_coco configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_gn-all_2x_coco_20200206-8eee02a6.pth --work-dir tools/batch_test/mask_rcnn_r50_fpn_gn-all_2x_coco --eval bbox segm --cfg-option dist_params.port=29688 &
echo 'configs/gn+ws/faster_rcnn_r50_fpn_gn_ws-all_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_gn_ws-all_1x_coco configs/gn+ws/faster_rcnn_r50_fpn_gn_ws-all_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_gn_ws-all_1x_coco_20200130-613d9fe2.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_gn_ws-all_1x_coco --eval bbox --cfg-option dist_params.port=29689 &
echo 'configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION grid_rcnn_r50_fpn_gn-head_2x_coco configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py $CHECKPOINT_DIR/grid_rcnn_r50_fpn_gn-head_2x_coco_20200130-6cca8223.pth --work-dir tools/batch_test/grid_rcnn_r50_fpn_gn-head_2x_coco --eval bbox --cfg-option dist_params.port=29690 &
echo 'configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_fpn_groie_1x_coco configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_groie_1x_coco_20200604_211715-66ee9516.pth --work-dir tools/batch_test/faster_rcnn_r50_fpn_groie_1x_coco --eval bbox --cfg-option dist_params.port=29691 &
echo 'configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION ga_retinanet_r50_caffe_fpn_1x_coco configs/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco.py $CHECKPOINT_DIR/ga_retinanet_r50_caffe_fpn_1x_coco_20201020-39581c6f.pth --work-dir tools/batch_test/ga_retinanet_r50_caffe_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29692 &
echo 'configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION ga_faster_r50_caffe_fpn_1x_coco configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py $CHECKPOINT_DIR/ga_faster_r50_caffe_fpn_1x_coco_20200702_000718-a11ccfe6.pth --work-dir tools/batch_test/ga_faster_r50_caffe_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29693 &
echo 'configs/hrnet/faster_rcnn_hrnetv2p_w18_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_hrnetv2p_w18_1x_coco configs/hrnet/faster_rcnn_hrnetv2p_w18_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_hrnetv2p_w18_1x_coco_20200130-56651a6d.pth --work-dir tools/batch_test/faster_rcnn_hrnetv2p_w18_1x_coco --eval bbox --cfg-option dist_params.port=29694 &
echo 'configs/htc/htc_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION htc_r50_fpn_1x_coco configs/htc/htc_r50_fpn_1x_coco.py $CHECKPOINT_DIR/htc_r50_fpn_1x_coco_20200317-7332cf16.pth --work-dir tools/batch_test/htc_r50_fpn_1x_coco --eval bbox segm --cfg-option dist_params.port=29695 &
echo 'configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION libra_faster_rcnn_r50_fpn_1x_coco configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/libra_faster_rcnn_r50_fpn_1x_coco_20200130-3afee3a9.pth --work-dir tools/batch_test/libra_faster_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29696 &
echo 'configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION mask_rcnn_r50_fpn_1x_coco configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_1x_coco_20200205-d4b0c5d6.pth --work-dir tools/batch_test/mask_rcnn_r50_fpn_1x_coco --eval bbox segm --cfg-option dist_params.port=29697 &
echo 'configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION ms_rcnn_r50_caffe_fpn_1x_coco configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py $CHECKPOINT_DIR/ms_rcnn_r50_caffe_fpn_1x_coco_20200702_180848-61c9355e.pth --work-dir tools/batch_test/ms_rcnn_r50_caffe_fpn_1x_coco --eval bbox segm --cfg-option dist_params.port=29698 &
echo 'configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py $CHECKPOINT_DIR/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco_20200520-1bdba3ce.pth --work-dir tools/batch_test/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco --eval bbox --cfg-option dist_params.port=29699 &
echo 'configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION retinanet_r50_nasfpn_crop640_50e_coco configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py $CHECKPOINT_DIR/retinanet_r50_nasfpn_crop640_50e_coco-0ad1f644.pth --work-dir tools/batch_test/retinanet_r50_nasfpn_crop640_50e_coco --eval bbox --cfg-option dist_params.port=29700 &
echo 'configs/paa/paa_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION paa_r50_fpn_1x_coco configs/paa/paa_r50_fpn_1x_coco.py $CHECKPOINT_DIR/paa_r50_fpn_1x_coco_20200821-936edec3.pth --work-dir tools/batch_test/paa_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29701 &
echo 'configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r50_pafpn_1x_coco configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_pafpn_1x_coco_bbox_mAP-0.375_20200503_105836-b7b4b9bd.pth --work-dir tools/batch_test/faster_rcnn_r50_pafpn_1x_coco --eval bbox --cfg-option dist_params.port=29702 &
echo 'configs/pisa/pisa_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pisa_faster_rcnn_r50_fpn_1x_coco configs/pisa/pisa_faster_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/pisa_faster_rcnn_r50_fpn_1x_coco-dea93523.pth --work-dir tools/batch_test/pisa_faster_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29703 &
echo 'configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION point_rend_r50_caffe_fpn_mstrain_1x_coco configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py $CHECKPOINT_DIR/point_rend_r50_caffe_fpn_mstrain_1x_coco-1bcb5fb4.pth --work-dir tools/batch_test/point_rend_r50_caffe_fpn_mstrain_1x_coco --eval bbox segm --cfg-option dist_params.port=29704 &
echo 'configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION mask_rcnn_regnetx-3.2GF_fpn_1x_coco configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_regnetx-3.2GF_fpn_1x_coco_20200520_163141-2a9d1814.pth --work-dir tools/batch_test/mask_rcnn_regnetx-3.2GF_fpn_1x_coco --eval bbox segm --cfg-option dist_params.port=29705 &
echo 'configs/reppoints/reppoints_moment_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION reppoints_moment_r50_fpn_1x_coco configs/reppoints/reppoints_moment_r50_fpn_1x_coco.py $CHECKPOINT_DIR/reppoints_moment_r50_fpn_1x_coco_20200330-b73db8d1.pth --work-dir tools/batch_test/reppoints_moment_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29706 &
echo 'configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_r2_101_fpn_2x_coco configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py $CHECKPOINT_DIR/faster_rcnn_r2_101_fpn_2x_coco-175f1da6.pth --work-dir tools/batch_test/faster_rcnn_r2_101_fpn_2x_coco --eval bbox --cfg-option dist_params.port=29707 &
echo 'configs/resnest/faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco configs/resnest/faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco_20200926_125502-20289c16.pth --work-dir tools/batch_test/faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco --eval bbox --cfg-option dist_params.port=29708 &
echo 'configs/retinanet/retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION retinanet_r50_fpn_1x_coco configs/retinanet/retinanet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth --work-dir tools/batch_test/retinanet_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29709 &
echo 'configs/rpn/rpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION rpn_r50_fpn_1x_coco configs/rpn/rpn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/rpn_r50_fpn_1x_coco_20200218-5525fa2e.pth --work-dir tools/batch_test/rpn_r50_fpn_1x_coco --eval proposal_fast --cfg-option dist_params.port=29710 &
echo 'configs/sabl/sabl_retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION sabl_retinanet_r50_fpn_1x_coco configs/sabl/sabl_retinanet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sabl_retinanet_r50_fpn_1x_coco-6c54fd4f.pth --work-dir tools/batch_test/sabl_retinanet_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29711 &
echo 'configs/sabl/sabl_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION sabl_faster_rcnn_r50_fpn_1x_coco configs/sabl/sabl_faster_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sabl_faster_rcnn_r50_fpn_1x_coco-e867595b.pth --work-dir tools/batch_test/sabl_faster_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29712 &
echo 'configs/scnet/scnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION scnet_r50_fpn_1x_coco configs/scnet/scnet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/scnet_r50_fpn_1x_coco-c3f09857.pth --work-dir tools/batch_test/scnet_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29713 &
echo 'configs/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION sparse_rcnn_r50_fpn_1x_coco configs/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sparse_rcnn_r50_fpn_1x_coco_20201222_214453-dc79b137.pth --work-dir tools/batch_test/sparse_rcnn_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29714 &
echo 'configs/ssd/ssd300_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION ssd300_coco configs/ssd/ssd300_coco.py $CHECKPOINT_DIR/ssd300_coco_20210803_015428-d231a06e.pth --work-dir tools/batch_test/ssd300_coco --eval bbox --cfg-option dist_params.port=29715 &
echo 'configs/tridentnet/tridentnet_r50_caffe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION tridentnet_r50_caffe_1x_coco configs/tridentnet/tridentnet_r50_caffe_1x_coco.py $CHECKPOINT_DIR/tridentnet_r50_caffe_1x_coco_20201230_141838-2ec0b530.pth --work-dir tools/batch_test/tridentnet_r50_caffe_1x_coco --eval bbox --cfg-option dist_params.port=29716 &
echo 'configs/vfnet/vfnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION vfnet_r50_fpn_1x_coco configs/vfnet/vfnet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth --work-dir tools/batch_test/vfnet_r50_fpn_1x_coco --eval bbox --cfg-option dist_params.port=29717 &
echo 'configs/yolact/yolact_r50_1x8_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION yolact_r50_1x8_coco configs/yolact/yolact_r50_1x8_coco.py $CHECKPOINT_DIR/yolact_r50_1x8_coco_20200908-f38d58df.pth --work-dir tools/batch_test/yolact_r50_1x8_coco --eval bbox segm --cfg-option dist_params.port=29718 &
echo 'configs/yolo/yolov3_d53_320_273e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION yolov3_d53_320_273e_coco configs/yolo/yolov3_d53_320_273e_coco.py $CHECKPOINT_DIR/yolov3_d53_320_273e_coco-421362b6.pth --work-dir tools/batch_test/yolov3_d53_320_273e_coco --eval bbox --cfg-option dist_params.port=29719 &
echo 'configs/yolof/yolof_r50_c5_8x8_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION yolof_r50_c5_8x8_1x_coco configs/yolof/yolof_r50_c5_8x8_1x_coco.py $CHECKPOINT_DIR/yolof_r50_c5_8x8_1x_coco_20210425_024427-8e864411.pth --work-dir tools/batch_test/yolof_r50_c5_8x8_1x_coco --eval bbox --cfg-option dist_params.port=29720 &
echo 'configs/centernet/centernet_resnet18_dcnv2_140e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION centernet_resnet18_dcnv2_140e_coco configs/centernet/centernet_resnet18_dcnv2_140e_coco.py $CHECKPOINT_DIR/centernet_resnet18_dcnv2_140e_coco_20210702_155131-c8cd631f.pth --work-dir tools/batch_test/centernet_resnet18_dcnv2_140e_coco --eval bbox --cfg-option dist_params.port=29721 &
echo 'configs/yolox/yolox_tiny_8x8_300e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION yolox_tiny_8x8_300e_coco configs/yolox/yolox_tiny_8x8_300e_coco.py $CHECKPOINT_DIR/yolox_tiny_8x8_300e_coco_20210806_234250-4ff3b67e.pth --work-dir tools/batch_test/yolox_tiny_8x8_300e_coco --eval bbox --cfg-option dist_params.port=29722 &
echo 'configs/ssd/ssdlite_mobilenetv2_scratch_600e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION ssdlite_mobilenetv2_scratch_600e_coco configs/ssd/ssdlite_mobilenetv2_scratch_600e_coco.py $CHECKPOINT_DIR/ssdlite_mobilenetv2_scratch_600e_coco_20210629_110627-974d9307.pth --work-dir tools/batch_test/ssdlite_mobilenetv2_scratch_600e_coco --eval bbox --cfg-option dist_params.port=29723 &
| 23,366 | 193.725 | 467 | sh |
mmdetection | mmdetection-master/.dev_scripts/train_benchmark.sh | echo 'configs/atss/atss_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab atss_r50_fpn_1x_coco configs/atss/atss_r50_fpn_1x_coco.py ./tools/work_dir/atss_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/autoassign/autoassign_r50_fpn_8x2_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab autoassign_r50_fpn_8x2_1x_coco configs/autoassign/autoassign_r50_fpn_8x2_1x_coco.py ./tools/work_dir/autoassign_r50_fpn_8x2_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab cascade_mask_rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/cascade_mask_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab crpn_faster_rcnn_r50_caffe_fpn_1x_coco configs/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco.py ./tools/work_dir/crpn_faster_rcnn_r50_caffe_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/centernet/centernet_resnet18_dcnv2_140e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab centernet_resnet18_dcnv2_140e_coco configs/centernet/centernet_resnet18_dcnv2_140e_coco.py ./tools/work_dir/centernet_resnet18_dcnv2_140e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py' &
GPUS=16 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab centripetalnet_hourglass104_mstest_16x6_210e_coco configs/centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py ./tools/work_dir/centripetalnet_hourglass104_mstest_16x6_210e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/cornernet/cornernet_hourglass104_mstest_8x6_210e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab cornernet_hourglass104_mstest_8x6_210e_coco configs/cornernet/cornernet_hourglass104_mstest_8x6_210e_coco.py ./tools/work_dir/cornernet_hourglass104_mstest_8x6_210e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/detectors/detectors_htc_r50_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab detectors_htc_r50_1x_coco configs/detectors/detectors_htc_r50_1x_coco.py ./tools/work_dir/detectors_htc_r50_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py' &
GPUS=16 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab deformable_detr_r50_16x2_50e_coco configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py ./tools/work_dir/deformable_detr_r50_16x2_50e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/detr/detr_r50_8x2_150e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab detr_r50_8x2_150e_coco configs/detr/detr_r50_8x2_150e_coco.py ./tools/work_dir/detr_r50_8x2_150e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab dh_faster_rcnn_r50_fpn_1x_coco configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/dh_faster_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab dynamic_rcnn_r50_fpn_1x_coco configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/dynamic_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_1x_coco configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_caffe_dc5_mstrain_1x_coco configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_1x_coco.py ./tools/work_dir/faster_rcnn_r50_caffe_dc5_mstrain_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_caffe_fpn_mstrain_1x_coco configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py ./tools/work_dir/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_caffe_fpn_1x_coco configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py ./tools/work_dir/faster_rcnn_r50_caffe_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_ohem_1x_coco configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_ohem_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py' &
GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab fovea_align_r50_fpn_gn-head_4x4_2x_coco configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py ./tools/work_dir/fovea_align_r50_fpn_gn-head_4x4_2x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/mask_rcnn/mask_rcnn_r50_fpn_fp16_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_fp16_1x_coco configs/mask_rcnn/mask_rcnn_r50_fpn_fp16_1x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_fp16_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/retinanet/retinanet_r50_fpn_fp16_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab retinanet_r50_fpn_fp16_1x_coco configs/retinanet/retinanet_r50_fpn_fp16_1x_coco.py ./tools/work_dir/retinanet_r50_fpn_fp16_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab retinanet_free_anchor_r50_fpn_1x_coco configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py ./tools/work_dir/retinanet_free_anchor_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/fsaf/fsaf_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab fsaf_r50_fpn_1x_coco configs/fsaf/fsaf_r50_fpn_1x_coco.py ./tools/work_dir/fsaf_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/gfl/gfl_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab gfl_r50_fpn_1x_coco configs/gfl/gfl_r50_fpn_1x_coco.py ./tools/work_dir/gfl_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/ghm/retinanet_ghm_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab retinanet_ghm_r50_fpn_1x_coco configs/ghm/retinanet_ghm_r50_fpn_1x_coco.py ./tools/work_dir/retinanet_ghm_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab grid_rcnn_r50_fpn_gn-head_2x_coco configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py ./tools/work_dir/grid_rcnn_r50_fpn_gn-head_2x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab ga_faster_r50_caffe_fpn_1x_coco configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py ./tools/work_dir/ga_faster_r50_caffe_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/htc/htc_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab htc_r50_fpn_1x_coco configs/htc/htc_r50_fpn_1x_coco.py ./tools/work_dir/htc_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/ld/ld_r18_gflv1_r101_fpn_coco_1x.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab ld_r18_gflv1_r101_fpn_coco_1x configs/ld/ld_r18_gflv1_r101_fpn_coco_1x.py ./tools/work_dir/ld_r18_gflv1_r101_fpn_coco_1x --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab libra_faster_rcnn_r50_fpn_1x_coco configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/libra_faster_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py ./tools/work_dir/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab ms_rcnn_r50_caffe_fpn_1x_coco configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py ./tools/work_dir/ms_rcnn_r50_caffe_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py' &
GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py ./tools/work_dir/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/paa/paa_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab paa_r50_fpn_1x_coco configs/paa/paa_r50_fpn_1x_coco.py ./tools/work_dir/paa_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/pisa/pisa_mask_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab pisa_mask_rcnn_r50_fpn_1x_coco configs/pisa/pisa_mask_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/pisa_mask_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab point_rend_r50_caffe_fpn_mstrain_1x_coco configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py ./tools/work_dir/point_rend_r50_caffe_fpn_mstrain_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab reppoints_moment_r50_fpn_gn-neck+head_1x_coco configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_1x_coco.py ./tools/work_dir/reppoints_moment_r50_fpn_gn-neck+head_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab retinanet_r50_caffe_fpn_1x_coco configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py ./tools/work_dir/retinanet_r50_caffe_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/rpn/rpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab rpn_r50_fpn_1x_coco configs/rpn/rpn_r50_fpn_1x_coco.py ./tools/work_dir/rpn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/sabl/sabl_retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab sabl_retinanet_r50_fpn_1x_coco configs/sabl/sabl_retinanet_r50_fpn_1x_coco.py ./tools/work_dir/sabl_retinanet_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/ssd/ssd300_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab ssd300_coco configs/ssd/ssd300_coco.py ./tools/work_dir/ssd300_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/tridentnet/tridentnet_r50_caffe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab tridentnet_r50_caffe_1x_coco configs/tridentnet/tridentnet_r50_caffe_1x_coco.py ./tools/work_dir/tridentnet_r50_caffe_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/vfnet/vfnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab vfnet_r50_fpn_1x_coco configs/vfnet/vfnet_r50_fpn_1x_coco.py ./tools/work_dir/vfnet_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/yolact/yolact_r50_8x8_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab yolact_r50_8x8_coco configs/yolact/yolact_r50_8x8_coco.py ./tools/work_dir/yolact_r50_8x8_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/yolo/yolov3_d53_320_273e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab yolov3_d53_320_273e_coco configs/yolo/yolov3_d53_320_273e_coco.py ./tools/work_dir/yolov3_d53_320_273e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab sparse_rcnn_r50_fpn_1x_coco configs/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco.py ./tools/work_dir/sparse_rcnn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/scnet/scnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab scnet_r50_fpn_1x_coco configs/scnet/scnet_r50_fpn_1x_coco.py ./tools/work_dir/scnet_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/yolof/yolof_r50_c5_8x8_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab yolof_r50_c5_8x8_1x_coco configs/yolof/yolof_r50_c5_8x8_1x_coco.py ./tools/work_dir/yolof_r50_c5_8x8_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/carafe/mask_rcnn_r50_fpn_carafe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_carafe_1x_coco configs/carafe/mask_rcnn_r50_fpn_carafe_1x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_carafe_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_mdpool_1x_coco configs/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_mdpool_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/dcn/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco configs/dcn/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/dcn/faster_rcnn_r50_fpn_dpool_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_dpool_1x_coco configs/dcn/faster_rcnn_r50_fpn_dpool_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_dpool_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/dcn/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco configs/dcn/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/gcnet/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco configs/gcnet/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_gn-all_2x_coco configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_gn-all_2x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_gn_ws-all_2x_coco configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py ./tools/work_dir/mask_rcnn_r50_fpn_gn_ws-all_2x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/hrnet/mask_rcnn_hrnetv2p_w18_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_hrnetv2p_w18_1x_coco configs/hrnet/mask_rcnn_hrnetv2p_w18_1x_coco.py ./tools/work_dir/mask_rcnn_hrnetv2p_w18_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_pafpn_1x_coco configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py ./tools/work_dir/faster_rcnn_r50_pafpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab retinanet_r50_nasfpn_crop640_50e_coco configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py ./tools/work_dir/retinanet_r50_nasfpn_crop640_50e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_regnetx-3.2GF_fpn_1x_coco configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py ./tools/work_dir/mask_rcnn_regnetx-3.2GF_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/resnest/mask_rcnn_s50_fpn_syncbn-backbone+head_mstrain_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_s50_fpn_syncbn-backbone+head_mstrain_1x_coco configs/resnest/mask_rcnn_s50_fpn_syncbn-backbone+head_mstrain_1x_coco.py ./tools/work_dir/mask_rcnn_s50_fpn_syncbn-backbone+head_mstrain_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r2_101_fpn_2x_coco configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py ./tools/work_dir/faster_rcnn_r2_101_fpn_2x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab faster_rcnn_r50_fpn_groie_1x_coco configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py ./tools/work_dir/faster_rcnn_r50_fpn_groie_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab mask_rcnn_r50_fpn_1x_cityscapes configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py ./tools/work_dir/mask_rcnn_r50_fpn_1x_cityscapes --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/panoptic_fpn/panoptic_fpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab panoptic_fpn_r50_fpn_1x_coco configs/panoptic_fpn/panoptic_fpn_r50_fpn_1x_coco.py ./tools/work_dir/panoptic_fpn_r50_fpn_1x_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/yolox/yolox_tiny_8x8_300e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab yolox_tiny_8x8_300e_coco configs/yolox/yolox_tiny_8x8_300e_coco.py ./tools/work_dir/yolox_tiny_8x8_300e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
echo 'configs/ssd/ssdlite_mobilenetv2_scratch_600e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh openmmlab ssdlite_mobilenetv2_scratch_600e_coco configs/ssd/ssdlite_mobilenetv2_scratch_600e_coco.py ./tools/work_dir/ssdlite_mobilenetv2_scratch_600e_coco --cfg-options checkpoint_config.max_keep_ckpts=1 >/dev/null &
| 22,182 | 163.318519 | 336 | sh |
mmdetection | mmdetection-master/docker/serve/entrypoint.sh | #!/bin/bash
set -e
if [[ "$1" = "serve" ]]; then
shift 1
torchserve --start --ts-config /home/model-server/config.properties
else
eval "$@"
fi
# prevent docker exit
tail -f /dev/null
| 197 | 14.230769 | 71 | sh |
mmdetection | mmdetection-master/tools/dist_test.sh | #!/usr/bin/env bash
CONFIG=$1
CHECKPOINT=$2
GPUS=$3
NNODES=${NNODES:-1}
NODE_RANK=${NODE_RANK:-0}
PORT=${PORT:-29500}
MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"}
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python -m torch.distributed.launch \
--nnodes=$NNODES \
--node_rank=$NODE_RANK \
--master_addr=$MASTER_ADDR \
--nproc_per_node=$GPUS \
--master_port=$PORT \
$(dirname "$0")/test.py \
$CONFIG \
$CHECKPOINT \
--launcher pytorch \
${@:4}
| 479 | 19.869565 | 43 | sh |
mmdetection | mmdetection-master/tools/dist_train.sh | #!/usr/bin/env bash
CONFIG=$1
GPUS=$2
NNODES=${NNODES:-1}
NODE_RANK=${NODE_RANK:-0}
PORT=${PORT:-29500}
MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"}
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python -m torch.distributed.launch \
--nnodes=$NNODES \
--node_rank=$NODE_RANK \
--master_addr=$MASTER_ADDR \
--nproc_per_node=$GPUS \
--master_port=$PORT \
$(dirname "$0")/train.py \
$CONFIG \
--seed 0 \
--launcher pytorch ${@:3}
| 457 | 20.809524 | 43 | sh |
mmdetection | mmdetection-master/tools/slurm_test.sh | #!/usr/bin/env bash
set -x
PARTITION=$1
JOB_NAME=$2
CONFIG=$3
CHECKPOINT=$4
GPUS=${GPUS:-8}
GPUS_PER_NODE=${GPUS_PER_NODE:-8}
CPUS_PER_TASK=${CPUS_PER_TASK:-5}
PY_ARGS=${@:5}
SRUN_ARGS=${SRUN_ARGS:-""}
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
--gres=gpu:${GPUS_PER_NODE} \
--ntasks=${GPUS} \
--ntasks-per-node=${GPUS_PER_NODE} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
${SRUN_ARGS} \
python -u tools/test.py ${CONFIG} ${CHECKPOINT} --launcher="slurm" ${PY_ARGS}
| 566 | 21.68 | 81 | sh |
mmdetection | mmdetection-master/tools/slurm_train.sh | #!/usr/bin/env bash
set -x
PARTITION=$1
JOB_NAME=$2
CONFIG=$3
WORK_DIR=$4
GPUS=${GPUS:-8}
GPUS_PER_NODE=${GPUS_PER_NODE:-8}
CPUS_PER_TASK=${CPUS_PER_TASK:-5}
SRUN_ARGS=${SRUN_ARGS:-""}
PY_ARGS=${@:5}
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
srun -p ${PARTITION} \
--job-name=${JOB_NAME} \
--gres=gpu:${GPUS_PER_NODE} \
--ntasks=${GPUS} \
--ntasks-per-node=${GPUS_PER_NODE} \
--cpus-per-task=${CPUS_PER_TASK} \
--kill-on-bad-exit=1 \
${SRUN_ARGS} \
python -u tools/train.py ${CONFIG} --work-dir=${WORK_DIR} --launcher="slurm" ${PY_ARGS}
| 574 | 22 | 91 | sh |
null | AICP-main/veins/src/veins/modules/analogueModel/BreakpointPathlossModel.cc | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "veins/modules/analogueModel/BreakpointPathlossModel.h"
#include "veins/base/messages/AirFrame_m.h"
using namespace veins;
using veins::AirFrame;
void BreakpointPathlossModel::filterSignal(Signal* signal)
{
auto senderPos = signal->getSenderPoa().pos.getPositionAt();
auto receiverPos = signal->getReceiverPoa().pos.getPositionAt();
/** Calculate the distance factor */
double distance = useTorus ? receiverPos.sqrTorusDist(senderPos, playgroundSize) : receiverPos.sqrdist(senderPos);
distance = sqrt(distance);
EV_TRACE << "distance is: " << distance << endl;
if (distance <= 1.0) {
// attenuation is negligible
return;
}
double attenuation = 1;
// PL(d) = PL0 + 10 alpha log10 (d/d0)
// 10 ^ { PL(d)/10 } = 10 ^{PL0 + 10 alpha log10 (d/d0)}/10
// 10 ^ { PL(d)/10 } = 10 ^ PL0/10 * 10 ^ { 10 log10 (d/d0)^alpha }/10
// 10 ^ { PL(d)/10 } = 10 ^ PL0/10 * 10 ^ { log10 (d/d0)^alpha }
// 10 ^ { PL(d)/10 } = 10 ^ PL0/10 * (d/d0)^alpha
if (distance < breakpointDistance) {
attenuation = attenuation * PL01_real;
attenuation = attenuation * pow(distance, alpha1);
}
else {
attenuation = attenuation * PL02_real;
attenuation = attenuation * pow(distance / breakpointDistance, alpha2);
}
attenuation = 1 / attenuation;
EV_TRACE << "attenuation is: " << attenuation << endl;
pathlosses.record(10 * log10(attenuation)); // in dB
*signal *= attenuation;
}
| 2,571 | 36.823529 | 118 | cc |
null | AICP-main/veins/src/veins/modules/analogueModel/BreakpointPathlossModel.h | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
#include <cstdlib>
#include "veins/veins.h"
#include "veins/base/phyLayer/AnalogueModel.h"
using veins::AirFrame;
namespace veins {
/**
* @brief Basic implementation of a BreakpointPathlossModel.
* This class can be used to implement the ieee802154 path loss model.
*
* @ingroup analogueModels
*/
class VEINS_API BreakpointPathlossModel : public AnalogueModel {
protected:
// /** @brief Model to use for distances below breakpoint distance */
// SimplePathlossModel closeRangeModel;
// /** @brief Model to use for distances larger than the breakpoint distance */
// SimplePathlossModel farRangeModel;
/** @brief initial path loss in dB */
double PL01, PL02;
/** @brief initial path loss */
double PL01_real, PL02_real;
/** @brief pathloss exponents */
double alpha1, alpha2;
/** @brief Breakpoint distance squared. */
double breakpointDistance;
/** @brief Information needed about the playground */
const bool useTorus;
/** @brief The size of the playground.*/
const Coord& playgroundSize;
/** logs computed pathlosses. */
cOutVector pathlosses;
public:
/**
* @brief Initializes the analogue model. playgroundSize
* need to be valid as long as this instance exists.
*/
BreakpointPathlossModel(cComponent* owner, double L01, double L02, double alpha1, double alpha2, double breakpointDistance, bool useTorus, const Coord& playgroundSize)
: AnalogueModel(owner)
, PL01(L01)
, PL02(L02)
, alpha1(alpha1)
, alpha2(alpha2)
, breakpointDistance(breakpointDistance)
, useTorus(useTorus)
, playgroundSize(playgroundSize)
{
PL01_real = pow(10, PL01 / 10);
PL02_real = pow(10, PL02 / 10);
pathlosses.setName("pathlosses");
}
/**
* @brief Filters a specified AirFrame's Signal by adding an attenuation
* over time to the Signal.
*/
void filterSignal(Signal*) override;
virtual bool isActiveAtDestination()
{
return true;
}
virtual bool isActiveAtOrigin()
{
return false;
}
};
} // namespace veins
| 3,259 | 29.185185 | 171 | h |
null | AICP-main/veins/src/veins/modules/analogueModel/NakagamiFading.cc | //
// Copyright (C) 2015 David Eckhoff <david.eckhoff@fau.de>
// Christoph Sommer <sommer@ccs-labs.org>
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "veins/modules/analogueModel/NakagamiFading.h"
using namespace veins;
/**
* Simple Nakagami-m fading (based on a constant factor across all time and frequencies).
*/
void NakagamiFading::filterSignal(Signal* signal)
{
auto senderPos = signal->getSenderPoa().pos.getPositionAt();
auto receiverPos = signal->getReceiverPoa().pos.getPositionAt();
const double M_CLOSE = 1.5;
const double M_FAR = 0.75;
const double DIS_THRESHOLD = 80;
EV_TRACE << "Add NakagamiFading ..." << endl;
// get average TX power
// FIXME: really use average power (instead of max)
EV_TRACE << "Finding max TX power ..." << endl;
double sendPower_mW = signal->getMax();
EV_TRACE << "TX power is " << FWMath::mW2dBm(sendPower_mW) << " dBm" << endl;
// get m value
double m = this->m;
{
const Coord senderPos2D(senderPos.x, senderPos.y);
const Coord receiverPos2D(receiverPos.x, receiverPos.y);
double d = senderPos2D.distance(receiverPos2D);
if (!constM) {
m = (d < DIS_THRESHOLD) ? M_CLOSE : M_FAR;
}
}
// calculate average RX power
double recvPower_mW = (RNGCONTEXT gamma_d(m, sendPower_mW / 1000 / m)) * 1000.0;
if (recvPower_mW > sendPower_mW) {
recvPower_mW = sendPower_mW;
}
EV_TRACE << "RX power is " << FWMath::mW2dBm(recvPower_mW) << " dBm" << endl;
// infer average attenuation
double factor = recvPower_mW / sendPower_mW;
EV_TRACE << "factor is: " << factor << " (i.e. " << FWMath::mW2dBm(factor) << " dB)" << endl;
*signal *= factor;
}
| 2,554 | 34.486111 | 97 | cc |
null | AICP-main/veins/src/veins/modules/analogueModel/NakagamiFading.h | //
// Copyright (C) 2015 David Eckhoff <david.eckhoff@fau.de>
// Christoph Sommer <sommer@ccs-labs.org>
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
#include "veins/base/phyLayer/AnalogueModel.h"
#include "veins/base/modules/BaseWorldUtility.h"
#include "veins/base/messages/AirFrame_m.h"
namespace veins {
/**
* @brief
* A simple model to account for fast fading using the Nakagami Distribution.
*
* See the Veins website <a href="http://veins.car2x.org/"> for a tutorial, documentation, and publications </a>.
*
* An in-depth description of the model is available at:
* Todo: add paper
*
* @author David Eckhoff, Christoph Sommer
*
* @ingroup analogueModels
*/
class VEINS_API NakagamiFading : public AnalogueModel {
public:
NakagamiFading(cComponent* owner, bool constM, double m)
: AnalogueModel(owner)
, constM(constM)
, m(m)
{
}
~NakagamiFading() override
{
}
void filterSignal(Signal* signal) override;
protected:
/** @brief Whether to use a constant m or a m based on distance */
bool constM;
/** @brief The value of the coefficient m */
double m;
};
} // namespace veins
| 1,992 | 27.471429 | 113 | h |
null | AICP-main/veins/src/veins/modules/analogueModel/PERModel.cc | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "veins/modules/analogueModel/PERModel.h"
#include "veins/base/messages/AirFrame_m.h"
using namespace veins;
using veins::AirFrame;
void PERModel::filterSignal(Signal* signal)
{
auto senderPos = signal->getSenderPoa().pos.getPositionAt();
auto receiverPos = signal->getReceiverPoa().pos.getPositionAt();
double attenuationFactor = 1; // no attenuation
if (packetErrorRate > 0 && RNGCONTEXT uniform(0, 1) < packetErrorRate) {
attenuationFactor = 0; // absorb all energy so that the receveir cannot receive anything
}
*signal *= attenuationFactor;
}
| 1,665 | 36.863636 | 101 | cc |
null | AICP-main/veins/src/veins/modules/analogueModel/PERModel.h | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
#include "veins/veins.h"
#include "veins/base/phyLayer/AnalogueModel.h"
using veins::AirFrame;
namespace veins {
/**
* @brief This class applies a parameterized packet error rate
* to incoming packets. This allows the user to easily
* study the robustness of its system to packet loss.
*
* @ingroup analogueModels
*
* @author Jérôme Rousselot <jerome.rousselot@csem.ch>
*/
class VEINS_API PERModel : public AnalogueModel {
protected:
double packetErrorRate;
public:
/** @brief The PERModel constructor takes as argument the packet error rate to apply (must be between 0 and 1). */
PERModel(cComponent* owner, double per)
: AnalogueModel(owner)
, packetErrorRate(per)
{
ASSERT(per <= 1 && per >= 0);
}
void filterSignal(Signal*) override;
};
} // namespace veins
| 1,911 | 30.344262 | 118 | h |
null | AICP-main/veins/src/veins/modules/analogueModel/SimpleObstacleShadowing.cc | //
// Copyright (C) 2006-2018 Christoph Sommer <sommer@ccs-labs.org>
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "veins/modules/analogueModel/SimpleObstacleShadowing.h"
using namespace veins;
using veins::AirFrame;
SimpleObstacleShadowing::SimpleObstacleShadowing(cComponent* owner, ObstacleControl& obstacleControl, bool useTorus, const Coord& playgroundSize)
: AnalogueModel(owner)
, obstacleControl(obstacleControl)
, useTorus(useTorus)
, playgroundSize(playgroundSize)
{
if (useTorus) throw cRuntimeError("SimpleObstacleShadowing does not work on torus-shaped playgrounds");
}
void SimpleObstacleShadowing::filterSignal(Signal* signal)
{
auto senderPos = signal->getSenderPoa().pos.getPositionAt();
auto receiverPos = signal->getReceiverPoa().pos.getPositionAt();
double factor = obstacleControl.calculateAttenuation(senderPos, receiverPos);
EV_TRACE << "value is: " << factor << endl;
*signal *= factor;
}
| 1,759 | 34.918367 | 145 | cc |
null | AICP-main/veins/src/veins/modules/analogueModel/SimpleObstacleShadowing.h | //
// Copyright (C) 2006-2018 Christoph Sommer <sommer@ccs-labs.org>
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
#include <cstdlib>
#include "veins/base/phyLayer/AnalogueModel.h"
#include "veins/base/modules/BaseWorldUtility.h"
#include "veins/modules/obstacle/ObstacleControl.h"
#include "veins/base/utils/Move.h"
#include "veins/base/messages/AirFrame_m.h"
using veins::AirFrame;
using veins::ObstacleControl;
namespace veins {
class Signal;
/**
* @brief Basic implementation of a SimpleObstacleShadowing
*
* @ingroup analogueModels
*/
class VEINS_API SimpleObstacleShadowing : public AnalogueModel {
protected:
/** @brief reference to global ObstacleControl instance */
ObstacleControl& obstacleControl;
/** @brief Information needed about the playground */
const bool useTorus;
/** @brief The size of the playground.*/
const Coord& playgroundSize;
public:
/**
* @brief Initializes the analogue model. myMove and playgroundSize
* need to be valid as long as this instance exists.
*
* The constructor needs some specific knowledge in order to create
* its mapping properly:
*
* @param owner pointer to the cComponent that owns this AnalogueModel
* @param obstacleControl the parent module
* @param useTorus information about the playground the host is moving in
* @param playgroundSize information about the playground the host is moving in
*/
SimpleObstacleShadowing(cComponent* owner, ObstacleControl& obstacleControl, bool useTorus, const Coord& playgroundSize);
/**
* @brief Filters a specified Signal by adding an attenuation
* over time to the Signal.
*/
void filterSignal(Signal* signal) override;
bool neverIncreasesPower() override
{
return true;
}
};
} // namespace veins
| 2,635 | 30.380952 | 125 | h |
null | AICP-main/veins/src/veins/modules/analogueModel/SimplePathlossModel.cc | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "veins/modules/analogueModel/SimplePathlossModel.h"
#include "veins/base/messages/AirFrame_m.h"
using namespace veins;
using veins::AirFrame;
void SimplePathlossModel::filterSignal(Signal* signal)
{
auto senderPos = signal->getSenderPoa().pos.getPositionAt();
auto receiverPos = signal->getReceiverPoa().pos.getPositionAt();
/** Calculate the distance factor */
double sqrDistance = useTorus ? receiverPos.sqrTorusDist(senderPos, playgroundSize) : receiverPos.sqrdist(senderPos);
EV_TRACE << "sqrdistance is: " << sqrDistance << endl;
if (sqrDistance <= 1.0) {
// attenuation is negligible
return;
}
// the part of the attenuation only depending on the distance
double distFactor = pow(sqrDistance, -pathLossAlphaHalf) / (16.0 * M_PI * M_PI);
EV_TRACE << "distance factor is: " << distFactor << endl;
Signal attenuation(signal->getSpectrum());
for (uint16_t i = 0; i < signal->getNumValues(); i++) {
double wavelength = BaseWorldUtility::speedOfLight() / signal->getSpectrum().freqAt(i);
attenuation.at(i) = (wavelength * wavelength) * distFactor;
}
*signal *= attenuation;
}
| 2,254 | 37.220339 | 121 | cc |
null | AICP-main/veins/src/veins/modules/analogueModel/SimplePathlossModel.h | //
// Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group
// Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands
// Copyright (C) 2007 Universitaet Paderborn (UPB), Germany
//
// Documentation for these modules is at http://veins.car2x.org/
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#pragma once
#include <cstdlib>
#include "veins/veins.h"
#include "veins/base/phyLayer/AnalogueModel.h"
#include "veins/base/modules/BaseWorldUtility.h"
namespace veins {
using veins::AirFrame;
class SimplePathlossModel;
/**
* @brief Basic implementation of a SimplePathlossModel
*
* An example config.xml for this AnalogueModel can be the following:
* @verbatim
<AnalogueModel type="SimplePathlossModel">
<!-- Environment parameter of the pathloss formula
If ommited default value is 3.5-->
<parameter name="alpha" type="double" value="3.5"/>
</AnalogueModel>
@endverbatim
*
* @ingroup analogueModels
*/
class VEINS_API SimplePathlossModel : public AnalogueModel {
protected:
/** @brief Path loss coefficient. **/
double pathLossAlphaHalf;
/** @brief Information needed about the playground */
const bool useTorus;
/** @brief The size of the playground.*/
const Coord& playgroundSize;
public:
/**
* @brief Initializes the analogue model. playgroundSize
* need to be valid as long as this instance exists.
*
* The constructor needs some specific knowledge in order to create
* its mapping properly:
*
* @param owner pointer to the cComponent that owns this AnalogueModel
* @param alpha the coefficient alpha (specified e.g. in config.xml and
* passed in constructor call)
* @param useTorus information about the playground the host is moving in
* @param playgroundSize information about the playground the host is
* moving in
*/
SimplePathlossModel(cComponent* owner, double alpha, bool useTorus, const Coord& playgroundSize)
: AnalogueModel(owner)
, pathLossAlphaHalf(alpha * 0.5)
, useTorus(useTorus)
, playgroundSize(playgroundSize)
{
}
/**
* @brief Filters a specified AirFrame's Signal by adding an attenuation
* over time to the Signal.
*/
void filterSignal(Signal*) override;
bool neverIncreasesPower() override
{
return true;
}
};
} // namespace veins
| 3,213 | 30.821782 | 101 | h |