// Find all methods on this hierarchy that match this // method's erased (name, signature) bool visit() { PseudoScope* scope = PseudoScope::cast(current_data()); InstanceKlass* iklass = current_class(); Method* m = iklass->find_method(_method_name, _method_signature); // private interface methods are not candidates for default methods // invokespecial to private interface methods doesn't use default method logic // The overpasses are your supertypes' errors, we do not include them // future: take access controls into account for superclass methods if (m != NULL && !m->is_static() && !m->is_overpass() && (!iklass->is_interface() || m->is_public())) { if (_family == NULL) { _family = new StatefulMethodFamily(); } if (iklass->is_interface()) { StateRestorer* restorer = _family->record_method_and_dq_further(m); scope->add_mark(restorer); } else { // This is the rule that methods in classes "win" (bad word) over // methods in interfaces. This works because of single inheritance _family->set_target_if_empty(m); } } return true; }
void FacenetClassifier::predict_knn_labels () { Mat current_class(0, 0, CV_32F); Mat current_response(0, 0, CV_32F); Mat current_distance (0, 0, CV_32F); float current_class_float, response, distance; float prediction; int j; cout << "Input Images: " << input_images.size() << endl; cout << "mat_training_tensors: " << mat_training_tensors.size () << endl; cout << "Input Files: " << input_files.size () << endl; for (int i = 0; i < input_images.size(); i++) { Mat input_mat, input_mat_flattened; output_mat.row(i).convertTo (input_mat, CV_32FC3); input_mat_flattened = input_mat.reshape (0,1); prediction = k_nearest->findNearest (input_mat_flattened, K_VALUE, current_class, current_response, current_distance); current_class_float = (float) current_class.at<float>(0,0); response = (float) current_response.at<float>(0,0); distance = (float) current_distance.at<float>(0,0); cout << "Output Index: " << i << endl; cout << mat_training_tensors.row(i).size() << " " << prediction << " " << input_files[i] << ": " << current_class_float << " " << distance << endl; } }
bool visit() { _registrar->register_class(current_class()); return true; }
bool visit() { InstanceKlass* cls = current_class(); streamIndentor si(tty, current_depth() * 2); tty->indent().print_cr("%s", cls->name()->as_C_string()); return true; }