TreeNode 1.5.2
A library to manipulate phylogenetic trees
|
Represents the attributes of a node. Attributes Name, Length and Support are always included. See the respective properties for default values. More...
Public Member Functions | |
void | Add (string name, object value) |
Adds an attribute with the specified name and value to the AttributeDictionary. Throws an exception if the AttributeDictionary already contains an attribute with the same name . More... | |
void | Add (KeyValuePair< string, object > item) |
Adds an attribute with the specified name and value to the AttributeDictionary. Throws an exception if the AttributeDictionary already contains an attribute with the same name. More... | |
void | Clear () |
Removes all attributes from the dictionary, except the "Name" , "Length" and "Support" attributes. More... | |
bool | Contains (KeyValuePair< string, object > item) |
Determines whether the AttributeDictionary contains the specified item . More... | |
bool | ContainsKey (string name) |
Determines whether the AttributeDictionary contains an attribute with the specified name name . More... | |
void | CopyTo (KeyValuePair< string, object >[] array, int arrayIndex) |
Copies the elements of the AttributeDictionary to an array, starting at a specific array index. More... | |
IEnumerator< KeyValuePair< string, object > > | GetEnumerator () |
Returns an enumerator that iterates through the AttributeDictionary. More... | |
bool | Remove (string name) |
Removes the attribute with the specified name from the AttributeDictionary. Attributes "Name" , "Length" and "Support" cannot be removed. More... | |
bool | Remove (KeyValuePair< string, object > item) |
Removes the attribute with the specified name from the AttributeDictionary. Attributes "Name" , "Length" and "Support" cannot be removed. More... | |
bool | TryGetValue (string name, out object value) |
Gets the value of the attribute with the specified name . Getting the value of attributes "Name" , "Length" and "Support" does not require a dictionary lookup. More... | |
AttributeDictionary () | |
Constructs an AttributeDictionary containing only the "Name" , "Length" and "Support" attributes. More... | |
Properties | |
string | Name [get, set] |
The name of this node (e.g. the species name for leaf nodes). Default is "" . Getting the value of this property does not require a dictionary lookup. More... | |
double | Length [get, set] |
The length of the branch leading to this node. This is double.NaN for branches whose length is not specified (e.g. the root node). Getting the value of this property does not require a dictionary lookup. More... | |
double | Support [get, set] |
The support value of this node. This is double.NaN for branches whose support is not specified. The interpretation of the support value depends on how the tree was built. Getting the value of this property does not require a dictionary lookup. More... | |
object | this[string name] [get, set] |
Gets or sets the value of the attribute with the specified name . Getting the value of attributes "Name" , "Length" and "Support" does not require a dictionary lookup. More... | |
ICollection< string > | Keys [get] |
Gets a collection containing the names of the attributes in the AttributeDictionary. More... | |
ICollection< object > | Values [get] |
Gets a collection containing the values of the attributes in the AttributeDictionary. More... | |
int | Count [get] |
Gets the number of attributes contained in the AttributeDictionary. More... | |
bool | IsReadOnly [get] |
Determine whether the AttributeDictionary is read-only. This is always false in the current implementation. More... | |
Represents the attributes of a node. Attributes Name, Length and Support are always included. See the respective properties for default values.
Definition at line 13 of file AttributeDictionary.cs.
PhyloTree.AttributeDictionary.AttributeDictionary | ( | ) |
Constructs an AttributeDictionary containing only the "Name"
, "Length"
and "Support"
attributes.
Definition at line 294 of file AttributeDictionary.cs.
void PhyloTree.AttributeDictionary.Add | ( | KeyValuePair< string, object > | item | ) |
Adds an attribute with the specified name and value to the AttributeDictionary. Throws an exception if the AttributeDictionary already contains an attribute with the same name.
item | The item to be added to the dictionary. |
Definition at line 153 of file AttributeDictionary.cs.
void PhyloTree.AttributeDictionary.Add | ( | string | name, |
object | value | ||
) |
Adds an attribute with the specified name and value to the AttributeDictionary. Throws an exception if the AttributeDictionary already contains an attribute with the same name .
name | The name of the attribute. |
value | The value of the attribute. |
Definition at line 144 of file AttributeDictionary.cs.
void PhyloTree.AttributeDictionary.Clear | ( | ) |
Removes all attributes from the dictionary, except the "Name"
, "Length"
and "Support"
attributes.
Definition at line 161 of file AttributeDictionary.cs.
bool PhyloTree.AttributeDictionary.Contains | ( | KeyValuePair< string, object > | item | ) |
Determines whether the AttributeDictionary contains the specified item .
item | The item to locate in the AttributeDictionary |
true
if the AttributeDictionary contains the specified item , false
otherwise.Definition at line 179 of file AttributeDictionary.cs.
bool PhyloTree.AttributeDictionary.ContainsKey | ( | string | name | ) |
Determines whether the AttributeDictionary contains an attribute with the specified name name .
name | The name of the attribute to locate. |
true
if the AttributeDictionary contains an attribute with the specified name , false
otherwise.Definition at line 189 of file AttributeDictionary.cs.
void PhyloTree.AttributeDictionary.CopyTo | ( | KeyValuePair< string, object >[] | array, |
int | arrayIndex | ||
) |
Copies the elements of the AttributeDictionary to an array, starting at a specific array index.
array | The array to which the elements will be copied. |
arrayIndex | The index at which to start copying. |
Definition at line 199 of file AttributeDictionary.cs.
IEnumerator< KeyValuePair< string, object > > PhyloTree.AttributeDictionary.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the AttributeDictionary.
Definition at line 214 of file AttributeDictionary.cs.
bool PhyloTree.AttributeDictionary.Remove | ( | KeyValuePair< string, object > | item | ) |
Removes the attribute with the specified name from the AttributeDictionary. Attributes "Name"
, "Length"
and "Support"
cannot be removed.
item | The attribute to remove (only the name will be used). |
bool
indicating whether the attribute was succesfully removed.Definition at line 241 of file AttributeDictionary.cs.
bool PhyloTree.AttributeDictionary.Remove | ( | string | name | ) |
Removes the attribute with the specified name from the AttributeDictionary. Attributes "Name"
, "Length"
and "Support"
cannot be removed.
name | The name of the attribute to remove. |
bool
indicating whether the attribute was succesfully removed.Definition at line 224 of file AttributeDictionary.cs.
bool PhyloTree.AttributeDictionary.TryGetValue | ( | string | name, |
out object | value | ||
) |
Gets the value of the attribute with the specified name . Getting the value of attributes "Name"
, "Length"
and "Support"
does not require a dictionary lookup.
name | The name of the attribute to get. |
value | When this method returns, contains the value of the attribute with the specified name , if this is found in the AttributeDictionary, or null otherwise. |
bool
indicating whether an attribute with the specified name was found in the AttributeDictionary.Definition at line 259 of file AttributeDictionary.cs.
|
get |
Gets the number of attributes contained in the AttributeDictionary.
Definition at line 132 of file AttributeDictionary.cs.
|
get |
Determine whether the AttributeDictionary is read-only. This is always false
in the current implementation.
Definition at line 137 of file AttributeDictionary.cs.
|
get |
Gets a collection containing the names of the attributes in the AttributeDictionary.
Definition at line 122 of file AttributeDictionary.cs.
|
getset |
The length of the branch leading to this node. This is double.NaN
for branches whose length is not specified (e.g. the root node). Getting the value of this property does not require a dictionary lookup.
Definition at line 40 of file AttributeDictionary.cs.
|
getset |
The name of this node (e.g. the species name for leaf nodes). Default is ""
. Getting the value of this property does not require a dictionary lookup.
Definition at line 22 of file AttributeDictionary.cs.
|
getset |
The support value of this node. This is double.NaN
for branches whose support is not specified. The interpretation of the support value depends on how the tree was built. Getting the value of this property does not require a dictionary lookup.
Definition at line 58 of file AttributeDictionary.cs.
|
getset |
Gets or sets the value of the attribute with the specified name . Getting the value of attributes "Name"
, "Length"
and "Support"
does not require a dictionary lookup.
name | The name of the attribute to get/set. |
object
.Definition at line 76 of file AttributeDictionary.cs.
|
get |
Gets a collection containing the values of the attributes in the AttributeDictionary.
Definition at line 127 of file AttributeDictionary.cs.