changeset 6668:e424fda8188b octave-forge

general: add INDEX, update docs
author highegg
date Tue, 09 Feb 2010 09:01:38 +0000
parents 94452cb02314
children c429eb741d23
files main/general/INDEX main/general/inst/@dict/dict.m
diffstat 2 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main/general/INDEX	Tue Feb 09 09:01:38 2010 +0000
@@ -0,0 +1,28 @@
+general_html >> General purpose functions
+Parallel Computing
+ pararrayfun
+ parcellfun
+Various Functions
+ adresamp2
+ safeprod
+ unresamp2
+ unvech
+ ztvals
+ SHA1
+ fload
+ fsave
+ mark_for_deletion
+ packfields
+ unpackfields
+Dictionaries
+ @dict/dict
+ @dict/display
+ @dict/get
+ @dict/has
+ @dict/isempty
+ @dict/join
+ @dict/length
+ @dict/struct
+ @dict/subsasgn
+ @dict/subsref
+
--- a/main/general/inst/@dict/dict.m	Tue Feb 09 07:53:59 2010 +0000
+++ b/main/general/inst/@dict/dict.m	Tue Feb 09 09:01:38 2010 +0000
@@ -19,6 +19,7 @@
 ## -*- texinfo -*-
 ## @deftypefn{Function File} {d =} dict (@var{keys}, @var{values})
 ## @deftypefnx{Function File} {d =} dict ()
+## @deftypefnx{Function File} {d =} dict (@var{str})
 ## Creates a dictionary object with given keys and values. @var{keys}
 ## should be a cell array of strings; @var{values} should be a cell array
 ## with matching size. @var{values} can also be a singleton array, in
@@ -26,6 +27,8 @@
 ## the default value of empty matrix is used.
 ## If neither @var{keys} nor @var{values} are supplied, an empty dictionary
 ## is constructed.
+## If a scalar structure is supplied as an argument, it is converted to 
+## a dictionary using field names as keys.
 ##
 ## A dictionary can be indexed either by a single string or cell array of
 ## strings, like this:
@@ -53,6 +56,9 @@
 ## rhs should match or rhs should be a singleton array, in which case it is
 ## broadcasted. 
 ##
+## It is also possible to retrieve keys and values as cell arrays, using the
+## "keys" and "values" properties. These properties are read-only.
+##
 ## @end deftypefn
 function d = dict (keys, values)