在spring和spring-boot中,通过注释方法和类会发生很多“魔术”。
出于学习目的和自己动手做东西,我很想看看它们,所以想知道如何找到注释“引起”的“魔术代码” ...
#Value Iteration
#V_(k+1)(s) = max[sum(p(s',r|s,a)[r+(discount)V_k(s')]]
def val_it(maxCap, lineNum, cost, loss, pop_array, discount_rate):
state_total = (maxCap+1)**lineNum #(M+1)^N total states
values = [0]*state_total #returned values for each state of value iteration
lines = [0]*lineNum #array for all lines of each state
print(lines)
print(len(lines))
for state in range(state_total):
action = nextState(state, state_total, values, lines, maxCap, cost, loss, pop_array, discount_rate)
values[state] = np.max(action) #set value of this state to best action return
#V_(k+1)(s) = MAX...
#have new customers arrive at lines
lines = add_cust(lineNum, pop_array, lines)
return(values)
“ is_implemented”完全不同时,如果我看看它们的话在Zipkin用户界面中是否有一本“烹饪书”,说明如何在弹簧罐中查找注释的实现代码?
答案 0 :(得分:0)
所有这些都可以在GitHub上找到。