// ĠCopyright Ġ 2 0 0 0 - 2 0 2 1 ĠJetBrains Ġs . r . o . Ġand Ġcontributors . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . ide . actions . sear che very where . ml . model Ċ Ċ import Ġcom . intellij . internal . ml . Feature Mapper ĊĊ Ċ class ĠSearch Every where Actions Ranking Model ( private Ġval Ġprovider : ĠSearch Every where Actions Ranking Model Provider ) Ġ{ ĊĠ Ġval Ġmodel Ġby Ġlazy Ġ{ Ġprovider . model Ġ} ĊĊĠ Ġfun Ġpredict ( features : ĠMap < String , ĠAny >): ĠDouble Ġ{ ĊĠĠĠ Ġreturn Ġmodel . predict ( build Array ( model . features Order , Ġfeatures )) ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġbuild Array ( features Order : ĠArray < Feature Mapper >, Ġfeatures : ĠMap < String , ĠAny >) Ġ: ĠDouble Array Ġ{ ĊĠĠĠ Ġval Ġarray Ġ= ĠDouble Array ( features Order . size ) ĊĠĠĠ Ġfor ( i Ġin Ġfeatures Order . indices ) Ġ{ ĊĠĠĠĠĠ Ġval Ġmapper Ġ= Ġfeatures Order [ i ] ĊĠĠĠĠĠ Ġval Ġvalue Ġ= Ġfeatures [ mapper . feature Name ] ĊĠĠĠĠĠ Ġarray [ i ] Ġ= Ġmapper . as Array Value ( value ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġarray ĊĠ Ġ} Ċ } Ċ