Program Library

From emergent
Jump to: navigation, search

See PublishedProgramList for currently-available wiki-hosted programs in the program library for emergent.

The Program Library or ProgLib is a collection of standard Programs that have been developed to perform a range of common functions, including the default algorithm- specific programs for training networks, etc. In the future, we plan to have an online version of this library that users can easily contribute to. In the mean time, please email your contributions to the developers, or svn commit them to prog_lib if you have svn write access. You can also maintain your own personal program library.

  • To load all the standard algorithm-specific programs from the library, do StdProgs on the Wizard.
  • To make a specific new program, do Add From Prog Lib under programs or one of the program subgroups.
  • To load over an existing program with a standard program from the library, do Update From Prog Lib in the Program menu on the Properties Editor on a selected Program.
  • To use the DiffCompare difference editor to selectively apply updates from a program library program to your existing program, do Diff From Prog Lib in the Properties editor menu -- this is the best option when you've made changes to your program locally, and want to preserve those changes while also updating to changes in the program lib version. You can also look for a Patch in the Patch Library that can provide a more effective update of an older project.

Note that each program has a set of associated tags (entered in the Properties editor for the Program) -- these tags can be used to select programs in the above functions -- they are the Categories at the top of the program library selector dialog.

How to create a Program from the library

  1. (optional) make a new group in which to put your new program
  2. right click on the desired group, select Add From ProgLib from the menu
  3. in the dialog, choose the desired lib - the libs are categorized, and also labeled according to whether they are from the System Library or your personal User Library

a new program is added to the group, based on the library program

How to create a blank new Program

  1. (optional) make a new group in which to put your new program
  2. right click on the desired group, select New from the menu

a new program is added to the group

How to import a Program into your local User Library

The main system Program Library resides in your emergent install directory, in the prog_lib folder (eg C:\Program Files\Emergent 5.1.0\prog_lib). The User Library for Programs is located in the local 'user_dir'. The path to the 'user_dir' can be viewed in the emergent preferences (eg C:\Users\your_user_name\Emergent\prog_lib). Both folders contain collections of programs (.prog files) which can be used in emergent projects.

Manual Program Import

To manually import an example program into your User Library:

  1. Copy the example program (example.prog) to prog_lib folder in user directory (C:\Users\your_user_name\Emergent\prog_lib)
  2. Open emergent and the User Library will automatically update based on the prog_lib directory contents.

The example.prog program is now available in the User Library, and the program can be added to any project.

emergent Program Import

Alternatively, to import an example program into your User Program Library from within emergent:

  1. Open an emergent project
  2. Create new program: In tree view, right-click on programs and select New from the menu to create a new program (use default names)
  3. Load example program: In the tree view, right-click on the new program, and select Object => Load from the menu, then browse to the location of the example.prog program. Select Open.
  4. Save example program to User Library: In the tree view, right-click on the loaded example program, and select Save to Prog Lib from the menu, and save the program to the user library == USER LIB. If the example.prog does not already exist in the user's prog_lib folder, then a copy will be created.


How to save a Program to a library

If you think you will want to reuse a program you have made or customized, in other projects, you can save a copy of the program to your personal program library (or the shared library, if you have file permissions):

  1. select the program you wish to save to the library
  2. right click, select Save To Prog Lib from the menu
  3. in the dialog, choose the appropriate library: USER LIB or SYSTEM LIB for local files, and WEB_APP_LIB, WEB_SCI_LIB or WEB_USER_LIB for a web (wiki-based) library (see Web Publishing for more info on those options.
  4. press Ok

The program will be saved to a file named according to the name of the lib.

Note that once you save a program to a lib, the lib copy is not updated automatically with any changes made to the active program in the project - if you change the project copy and want to update the library copy, you must save it again.