// Deserialize this result group from the serialized data
        public void Deserialize(SearchResult.SerializableResultGroup serializedResultGroup, List <ReferenceNode> allNodes)
        {
            if (serializedResultGroup.initialSerializedNodes != null)
            {
                for (int i = 0; i < serializedResultGroup.initialSerializedNodes.Count; i++)
                {
                    references.Add(allNodes[serializedResultGroup.initialSerializedNodes[i]]);
                }
            }

            referencePathsShortUnique = null;
            referencePathsShortest    = null;
        }
        // Serialize this result group
        public SearchResult.SerializableResultGroup Serialize(Dictionary <ReferenceNode, int> nodeToIndex, List <SearchResult.SerializableNode> serializedNodes)
        {
            SearchResult.SerializableResultGroup serializedResultGroup = new SearchResult.SerializableResultGroup()
            {
                title     = title,
                clickable = clickable
            };

            if (references != null)
            {
                serializedResultGroup.initialSerializedNodes = new List <int>(references.Count);

                for (int i = 0; i < references.Count; i++)
                {
                    serializedResultGroup.initialSerializedNodes.Add(references[i].SerializeRecursively(nodeToIndex, serializedNodes));
                }
            }

            return(serializedResultGroup);
        }