This functions are used in all Torch package for creating and handling classes. The most interesting function is probably torch.class() which allows the user to create easily new classes. torch.typename() might also be interesting to check what is the class of a given Torch object.

The other functions are more for advanced users.

Subsections

  1. [metatable] torch.class(name, [parentName])
  2. [string] torch.typename(object)
  3. [table] torch.newmetatable(name, parentName, constructor)
  4. [function] torch.factory(name)
  5. [table] torch.getmetatable(string)
  6. [boolean] torch.isequal(object1, object2)
  7. torch.setenv(function or userdata, table)
  8. [table] torch.getenv(function or userdata)
  9. [number] torch.pointer(object)