class_docstr: By: Xing Shi (xingshi@usc.edu)
  
  This meta-hash performs hash permutations on binary bucket keys.
  You use this just like every other LSHash implementation and
  add the actual binary hashes you want to use via the add_child_hash
  method. Each child hash will be used separately.
  
  After all vectors have been indexed you have to call build_permuted_index
  to generate the permuted index.
  
  So to use this you have to do the following steps:
  
  1. Create HashPermutations instance and use it in the Engine constructor
  2. Add your binary hashes as child hashes by calling add_child_hash()
  3. Store your vectors using the Engine
  4. Build the permuted index by calling build_permuted_index()
  5. Now when you query the permuted index is used
  
  If you are adding more vectors afterwards you can update the permuted index
  by calling build_permuted_index() again and again.
class_docstr_tok: ["By",":","Xing","Shi","(","xingshi","@","usc.edu",")","This","meta-hash","performs","hash","permutations","on","binary","bucket","keys",".","You","use","this","just","like","every","other","LSHash","implementation","and","add","the","actual","binary","hashes","you","want","to","use","via","the","add_child_hash","method",".","Each","child","hash","will","be","used","separately",".","After","all","vectors","have","been","indexed","you","have","to","call","build_permuted_index","to","generate","the","permuted","index",".","So","to","use","this","you","have","to","do","the","following","steps",":","1",".","Create","HashPermutations","instance","and","use","it","in","the","Engine","constructor","2",".","Add","your","binary","hashes","as","child","hashes","by","calling","add_child_hash","(",")","3",".","Store","your","vectors","using","the","Engine","4",".","Build","the","permuted","index","by","calling","build_permuted_index","(",")","5",".","Now","when","you","query","the","permuted","index","is","used","If","you","are","adding","more","vectors","afterwards","you","can","update","the","permuted","index","by","calling","build_permuted_index","(",")","again","and","again","."]
docstr: Build PermutedIndex for all your binary hashings.
  PermutedIndex would be used to find the neighbour bucket key
  in terms of Hamming distance. Permute_configs is nested dict
  in the following format:
  permuted_config = {"<hash_name>":
                     { "num_permutation":50,
                       "beam_size":10,
                       "num_neighbour":100 }
                    }
docstr_tok: ["Build","PermutedIndex","for","all","your","binary","hashings",".","PermutedIndex","would","be","used","to","find","the","neighbour","bucket","key","in","terms","of","Hamming","distance",".","Permute_configs","is","nested","dict","in","the","following","format",":","permuted_config","=","{","``","<","hash_name",">","''",":","{","``","num_permutation","''",":50",",","``","beam_size","''",":10",",","``","num_neighbour","''",":100","}","}"]
code: def build_permuted_index(self):
      """
      Build PermutedIndex for all your binary hashings.
      PermutedIndex would be used to find the neighbour bucket key
      in terms of Hamming distance. Permute_configs is nested dict
      in the following format:
      permuted_config = {"<hash_name>":
                         { "num_permutation":50,
                           "beam_size":10,
                           "num_neighbour":100 }
                        }
      """
  
      for child_hash in self.child_hashes:
          # Get config values for child hash
          config = child_hash["config"]
          num_permutation = config["num_permutation"]
          beam_size = config["beam_size"]
          num_neighbour = config["num_neighbour"]
  
          # Get used buckets keys for child hash
          bucket_keys = child_hash["bucket_keys"].keys()
  
          # Get actual child hash
          lshash = child_hash["hash"]
  
          # Compute permuted index for this hash
          self.permutation.build_permuted_index(
              lshash,
              bucket_keys,
              num_permutation,
              beam_size,
              num_neighbour,
          )
  
file_path: NearPy/nearpy/hashes/permutation/hashpermutations.py
imports: import numpy
  from nearpy.hashes import LSHash, RandomBinaryProjections, PCABinaryProjections, RandomBinaryProjectionTree
  from nearpy.hashes.permutation import Permutation
label_desc: Use image node_id 7 for calling the HashPermutations obj's underlying member method code with example usage: obj.build_permuted_index() without return types