Home > database >  O predecessors to guide the following code is what scripting language, file suffix for. Jl
O predecessors to guide the following code is what scripting language, file suffix for. Jl

Time:10-12

The import LegacyFeatures. F_radial_goal_grid

# import Base. Test. @ Test
The import Base. Length

Export ParameterizedFeatureBlock, ParameterizedFeatureFunction
Export the evaluate
Export FeatureBlock
Export GOAL_GRID INTRUDER_GRID, the FEATURES of
Export f_in_goal f_mindist_time, f_one_over_mindist_time f_exp_neg_mindist, f_exp_neg_dist, f_one_over_mindist, f_one_over_dist, f_intruder_dist, f_one, f_goal_dist, f_abs_goal_bearing, f_radial_intruder_grid, f_radial_goal_grid, f_exp_neg_goal_dist, f_within_goal_dist, f_conflict, f_focused_intruder_grid, f_half_intruder_bin_grid, f_has_deviated, f_symmetric_goal_grid

Type FeatureBlock
Members: : Vector {Any}
Uses_mem: : Bool
End
The function FeatureBlock {T} : [members: Vector {T})
Mymem={}
The for m members in
If the isa # (m, Symbol) whether m for Symbol type
Push! (mymem FeatureFunction (m)) # push! What do you mean?
The else
Push! Mymem (m)
End
End
Return FeatureBlock (mymem, any ([uses_mem (m) for m in mymem]))
End

Length (b: : FeatureBlock)=sum ([length (m) for m in b.m embers]) #???????
Uses_mem (b: : FeatureBlock)=b.u ses_mem #???????


# fun returns a single element vector, there are many param values
Type ParameterizedFeatureBlock
Fun: : Symbol
Params: the Vector {Any}
End

Length (b: : ParameterizedFeatureBlock)=length (p. arams)
Uses_mem (b: : ParameterizedFeatureBlock)=false

# fun may return a multi - element vector, there is only one param value
Type ParameterizedFeatureFunction
Fun: : Symbol
Param: : Any

Uses_mem: : Bool
Length: : Int64
End
ParameterizedFeatureFunction (fun: : Symbol, param: : Any)=ParameterizedFeatureFunction (fun, param, false)
The function ParameterizedFeatureFunction (fun: : Symbol, param: : Any, the memory: : Bool)
Ret=eval (fun) (gen_test_state (), param)
Return ParameterizedFeatureFunction (fun, param, memory, length (ret))
end

CodePudding user response:

CodePudding user response:

Haven't seen, if the code is correct, certainly is not the PB, Delphi, Java, VC, VB, c #, the other used, not clear

CodePudding user response:

Is Julia language
  • Related