Documentation

The engine.
Post Reply
dragon_mod
Posts: 2
Joined: Wed Sep 29, 2021 11:32 am

Documentation

Post by dragon_mod »

Hello all,

my name is Jan and I am currently writing my Bachelor Thesis with Python, GeNIe, and PySmile.
I already read the Manuals (Wrappers.pdf and Smile.pdf) but unfortunately, I miss something like complete documentation of all available functions.

Normally I write my programs with Delphi and there is whole documentation available (see: https://docwiki.embarcadero.com/Librari ... hortString) or something like in Java (see: https://docs.oracle.com/javase/7/docs/a ... mmary.html).

If anyone has more or less complete documentation with all the functions available and the parameters for each function I would be very thankful!

If necessary, I am currently programming in the IDE Spyder 5.
piotr [BayesFusion]
Site Admin
Posts: 44
Joined: Mon Nov 06, 2017 6:41 pm

Re: Documentation

Post by piotr [BayesFusion] »

All available functions could be listed by Python help command e.g. help(pysmile.Network) in Python Interpreter command line.

Below is output of this command for Network Class:

Code: Select all

class Network(pybind11_builtins.pybind11_object)
 |  Method resolution order:
 |      Network
 |      pybind11_builtins.pybind11_object
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __copy__(...)
 |      __copy__(self: pysmile.Network) -> pysmile.Network
 |
 |  __deepcopy__(...)
 |      __deepcopy__(self: pysmile.Network) -> pysmile.Network
 |
 |  __init__(...)
 |      __init__(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. __init__(self: pysmile.Network) -> None
 |
 |      2. __init__(self: pysmile.Network, arg0: pysmile.Network) -> None
 |
 |  add_arc(...)
 |      add_arc(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_arc(self: pysmile.Network, parent_handle: int, child_handle: int) -> None
 |
 |      Add arc by node handles
 |
 |      2. add_arc(self: pysmile.Network, parent_id: str, child_id: str) -> None
 |
 |      Add arc by node IDs
 |
 |  add_cost_arc(...)
 |      add_cost_arc(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_cost_arc(self: pysmile.Network, parent_handle: int, child_handle: int) -> None
 |
 |      2. add_cost_arc(self: pysmile.Network, parent_id: str, child_id: str) -> None
 |
 |  add_node(...)
 |      add_node(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_node(self: pysmile.Network, node_type: pysmile.NodeType, node_id: str) -> int
 |
 |      Add node with specified type and ID; returns created node handle
 |
 |      2. add_node(self: pysmile.Network, node_type: pysmile.NodeType) -> int
 |
 |      Add node with specified type and default ID; returns created node handle
 |
 |      3. add_node(self: pysmile.Network) -> int
 |
 |      Add node with default type and default ID; returns created node handle
 .
 .
 .
You can use that command on entire PySmile library by typing help(pysmile) - there should be all classes and variables available in PySmile.
dragon_mod
Posts: 2
Joined: Wed Sep 29, 2021 11:32 am

Re: Documentation

Post by dragon_mod »

piotr [BayesFusion] wrote: Thu Sep 30, 2021 12:27 pm All available functions could be listed by Python help command e.g. help(pysmile.Network) in Python Interpreter command line.

Below is output of this command for Network Class:

Code: Select all

class Network(pybind11_builtins.pybind11_object)
 |  Method resolution order:
 |      Network
 |      pybind11_builtins.pybind11_object
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __copy__(...)
 |      __copy__(self: pysmile.Network) -> pysmile.Network
 |
 |  __deepcopy__(...)
 |      __deepcopy__(self: pysmile.Network) -> pysmile.Network
 |
 |  __init__(...)
 |      __init__(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. __init__(self: pysmile.Network) -> None
 |
 |      2. __init__(self: pysmile.Network, arg0: pysmile.Network) -> None
 |
 |  add_arc(...)
 |      add_arc(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_arc(self: pysmile.Network, parent_handle: int, child_handle: int) -> None
 |
 |      Add arc by node handles
 |
 |      2. add_arc(self: pysmile.Network, parent_id: str, child_id: str) -> None
 |
 |      Add arc by node IDs
 |
 |  add_cost_arc(...)
 |      add_cost_arc(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_cost_arc(self: pysmile.Network, parent_handle: int, child_handle: int) -> None
 |
 |      2. add_cost_arc(self: pysmile.Network, parent_id: str, child_id: str) -> None
 |
 |  add_node(...)
 |      add_node(*args, **kwargs)
 |      Overloaded function.
 |
 |      1. add_node(self: pysmile.Network, node_type: pysmile.NodeType, node_id: str) -> int
 |
 |      Add node with specified type and ID; returns created node handle
 |
 |      2. add_node(self: pysmile.Network, node_type: pysmile.NodeType) -> int
 |
 |      Add node with specified type and default ID; returns created node handle
 |
 |      3. add_node(self: pysmile.Network) -> int
 |
 |      Add node with default type and default ID; returns created node handle
 .
 .
 .
You can use that command on entire PySmile library by typing help(pysmile) - there should be all classes and variables available in PySmile.
That happens if you are new to Python ...

Thank you very much! That will help a lot!
Post Reply