Constraint: Abstract base class for constraints.

ConstraintR Documentation

Abstract base class for constraints.

Description

Abstract base class for constraints.

Abstract base class for constraints.

Details

A constraint object represents a region over which a variable is valid, e.g. within which a variable can be optimized.

Methods

Public methods


Method check()

Returns a byte tensor of sample_shape + batch_shape indicating whether each event in value satisfies this constraint.

Usage
Constraint$check(value)
Arguments
value

each event in value will be checked.


Method print()

Define the print method for constraints,

Usage
Constraint$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
Constraint$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


torch documentation built on June 7, 2023, 6:19 p.m.